#35130: Document how to manually close database connections ------------------------------------------------+------------------------ Reporter: Baptiste Mispelon | Owner: nobody Type: Cleanup/optimization | Status: new Component: Documentation | Version: 5.0 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ------------------------------------------------+------------------------ I was reading about manual database connection management today and came upon this section (emphasis mine) [1]:
> If a connection is created in a long-running process, outside of Django’s request-response cycle, the connection will remain open **until explicitly closed**, or timeout occurs. From what I understand, manually closing open db connections is done by calling `django.db.close_old_connections()`, but that function does not seem to be documented officially. I'm not sure if the function is undocumented by design (it is after all a pretty unusual use-case and most users should never have to call it themselves), or if that was just an omission. [1] https://docs.djangoproject.com/en/dev/ref/databases/#caveats -- Ticket URL: <https://code.djangoproject.com/ticket/35130> 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/0107018d21d24965-715cd558-a1e8-4ddb-a834-1b09109aa84a-000000%40eu-central-1.amazonses.com.