I have some questions regarding running djcelery.
When I run
python manage.py celeryd --setting=settings
The workers seem to have started but the warnings concern me:
C:\Python27\lib\site-packages\djcelery\loaders.py:86: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
Googled for this warning message but no one seems to care about it. Should I be concerned?
Thanks a lot!
It is what it says it is - a warning that settings.DEBUG
should not be set for production deployments. If you're just using it for development, then it is not something to be concerned about. In general, this ought to apply whether you use django-celery or not.
I have not looked up the details, but as mentioned in this answer:
When
DEBUG
is enabled Django appends every executed SQL statement todjango.db.connection.queries
, this will grow unbounded in a long running process environment.
The officially recommended way to start celeryd for django-celery is:
python manage.py celeryd --setting=settings
Today, I forgot this and directly start celeryd by
python -m celery.bin.celeryd --config=settings
and viola, no warnings! And it works just fine! The Celery group really need to work on their docs. Although it seems comprehensive, some key pieces are missing to cover all the grounds imho.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With