Opened 16 years ago

Closed 16 years ago

Last modified 10 years ago

#6734 closed (fixed)

Ceiling limit to connection.queries

Reported by: miohtama Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: memory leak, sql, connection, standalone
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: 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:

This all could be solved by simply making connection.queries working as FIFO queue and store max. 100 queries. No more "memory leaks", ever.

Change History (2)

comment:1 by Karen Tracey <kmtracey@…>, 16 years ago

Resolution: duplicate
Status: newclosed

Capping connection.queries was proposed and rejected in #3711. Looks like that one is still open for getting a note about the behavior into the official docs.

comment:2 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

Resolution: duplicatefixed

In cfcca7ccce3dc527d16757ff6dc978e50c4a2e61:

Fixed #3711, #6734, #12581 -- Bounded connection.queries.

Prevented unlimited memory consumption when running background tasks
with DEBUG=True.

Thanks Rob, Alex, Baptiste, and others.

Note: See TracTickets for help on using tickets.
Back to Top