I use celery in Django with RabbitMQ as a broker on Heroku. My service is RabbitMQ CloudAMQP Tough on Heroku. If appropriate, we had some frequent memory leaks that I tried to plug in, but usually the service does not get worse when this happens.
When the site is heavily loaded (for example, today), I start to receive random errors, for example:
Couldn't log in: a socket error occurred
The task is completely thrown out and is not registered anywhere. This is obviously a business critical issue. Celery settings below:
BROKER_URL = os.getenv('CLOUDAMQP_URL', DEFAULT_AMQP) CELERY_TASK_SERIALIZER = 'pickle' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['pickle', 'json'] CELERY_ENABLE_UTC = True # CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'] CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True CELERY_SEND_TASK_ERROR_EMAILS = True CELERY_RESULT_BACKEND = False CELERY_IMPORTS = ('business.admin', 'mainsite.views', 'utils.crons', 'mainsite.forms', ) BROKER_POOL_LIMIT = 5 # trying to clean up this memory leak CELERYD_MAX_TASKS_PER_CHILD = 5 CELERYD_TASK_TIME_LIMIT = 60*60
I'm a little new to celery, so I gladly provide to keep track of any logs / etc, but I'm not even sure what you should provide at this point. Is there something obvious in my settings or environment, it looks like this could cause this problem in heavy trading?
source share