When we use streaming responses in Django, or the static MEDIA (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) in url patterns) serving in development mode, the "request_finished" signal is never sent at the end of the request.
Django uses this signal to clean up db connections and return them to the pool, which means these connections leak.
When we use streaming responses in Django, or the static MEDIA (
static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)in url patterns) serving in development mode, the "request_finished" signal is never sent at the end of the request.Django uses this signal to clean up db connections and return them to the pool, which means these connections leak.