12

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!

4

2 回答 2

18

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 to django.db.connection.queries, this will grow unbounded in a long running process environment.

于 2011-12-08T10:56:57.717 回答
1

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.

于 2011-12-09T06:27:36.613 回答