Ceiling limit to connection.queries
|Reported by:||miohtama||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Severity:||Keywords:||memory leak, sql, connection, standalone|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you run Django in standalone mode, debugging enabled, all SQL queries get logged. Eventually in long running processes this will exhaust the process memory. This is "known feature" and the current solution is to have FAQ about the issue. When something leaks memory, people might not look FAQ as the first resolution: http://blog.redinnovation.com/2008/03/07/debugging-django-memory-leak-with-trackrefs-and-guppy/
This all could be solved by simply making connection.queries working as FIFO queue and store max. 100 queries. No more "memory leaks", ever.