[Fixed]-RabbitMQ/Celery/Django Memory Leak?

2๐Ÿ‘

I am almost certain you are running this setup with DEBUG=True wich leads to a memory leak.

Check this post: Disable Django Debugging for Celery.

Iโ€™ll post my configuration in case it helps.

settings.py

djcelery.setup_loader()
BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_VHOST = "rabbit"
BROKER_USER = "YYYYYY"
BROKER_PASSWORD = "XXXXXXX"

CELERY_IGNORE_RESULT = True
CELERY_DISABLE_RATE_LIMITS = True
CELERY_ACKS_LATE = True
CELERYD_PREFETCH_MULTIPLIER = 1
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
CELERY_ROUTES = ('FILE_WITH_ROUTES',)
๐Ÿ‘คHassek

1๐Ÿ‘

You might be hitting this issue in librabbitmq. Please check whether or not Celery is using librabbitmq>=1.0.1.

A simple fix to try is: pip install librabbitmq>=1.0.1.

๐Ÿ‘คdnozay

Leave a comment