Is it possible to set DEBUG=False for only a specific app in Django? Celery has a known memory leak when debugging is enabled. I have a development server where I want Celery to run as a service, without debugging so it doesn’t leak memory, but I want the rest of my Django app to use debugging so errors will be shown when testing.
Share
Celery doesn’t have a memory leak, it’s how Django works:
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.I guess you could use a hack like: