S
S
StopDesign2016-07-05 10:40:07
Django
StopDesign, 2016-07-05 10:40:07

How to run many parallel tasks in celery and not die?

There is a monitoring service on Django. He checks something there according to the schedule. Checks are run through celery. The problem arises when many targets freeze at the same time. celery tasks have a timeout of 30 seconds. When checking once every five minutes, a dozen hung tasks are enough to clog the entire queue.
We cannot run many celery workers, because a system with five workers no longer fits into a virtual machine with 1 GB of memory.
How can this problem be solved? How to radically reduce the memory consumption of workers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil Biryukov-Romanov, 2016-07-05
@urtow

See why tasks hang and solve the source of the problem, not the consequences.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question