#34865: DatabaseWrapper are not GC and connections are not closed -------------------------------------+------------------------------------- Reporter: domingues | Owner: nobody Type: Bug | Status: new Component: Database | Version: 4.2 layer (models, ORM) | Severity: Normal | Keywords: Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- I have found possible memory leak when investigating why database connections where not closed after the thread/coroutine ended (https://code.djangoproject.com/ticket/33497 and https://github.com/django/django/pull/17275), the `DatabaseWrapper` ends up in a circular reference with `DatabaseFeatures`/`DatabaseCreation`/`DatabaseClient`/... and the GC could not cleanup the objects. I tryed use `WeakRef` from the "child" objects to the wrapper or deleting the `__dict__` and the wrapper was collected and the connections was closed.
-- Ticket URL: <https://code.djangoproject.com/ticket/34865> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018abc520809-503d72c1-501a-4b3c-92dc-c341a1a78def-000000%40eu-central-1.amazonses.com.