Closed
Description
I recently tracked down a memory leak in our app, which turned out to be caused by the debug toolbar.
Our Django app launches and destroys a thread in the context of a view (to talk to a websocket server). When that thread writes to logs, debug_toolbar creates a reference to the Thread instance which it never clears. Disabling DEBUG makes no difference.
Essentially this call only clears the view thread, and not any sub-threads that may have been created in the view.
I think you might want to make _records
in LoggingPanel
a weak key dictionary, if I have understood the code correctly...
Metadata
Metadata
Assignees
Labels
No labels