#33297: ASGI: Dead persistent postgres connections are not closed sometimes
-------------------------------+--------------------------------------
Reporter: Matt Davis | Owner: nobody
Type: Bug | Status: closed
Component: Uncategorized | Version: 3.2
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => needsinfo
Comment:
> ... if this issue ends up being one of the other libraries at play (DRF,
uvicorn, fastapi)...
Impossible to say without a reproduce, but I suspect this is the case. I'm
going to close as `needsinfo` but if you can reduce it to an example just
using Django, then I'm very happy to take another look!
> ...the actual cause of the stack trace is the closed Django DB
connection ...
[https://github.com/django/django/blob/f0480ddd2d3cb04b784cf7ea697f792b45c689cc/django/db/__init__.py#L34-L42
Django has a routine to clean up old connections that is tied into the
request-response life-cycle]. This is triggered by Django's HTTP handlers
once the response is sent. The suspicion would be that your alternate
stack isn't triggering that cleanup, and you'll need to add that yourself.
--
Ticket URL: <https://code.djangoproject.com/ticket/33297#comment:1>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.453961183d6967b26f6df73801121977%40djangoproject.com.