#33497: Database persistent connections do not work with ASGI in 4.0
-------------------------------------+-------------------------------------
Reporter: Stenkar | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ASGI; Database | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Patryk Zawadzki):
This is marked as a "new feature," but it's an undocumented breaking
change between 3.2 and 4.0. Connections that were previously reused and
terminated are now just left to linger.
The {{{request_finished}}} signal does not terminate them as they are not
idle for longer than {{{MAX_CONN_AGE}}}.
The {{{request_started}}} signal does not terminate them as it never sees
those connections due to the connection state being {{{asgiref.local}}}
and discarded after every request.
Allowing parallel execution of requests is a great change, but I feel
Django should outright refuse to start if {{{MAX_CONN_AGE}}} is combined
with ASGI.
--
Ticket URL: <https://code.djangoproject.com/ticket/33497#comment:12>
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/010701830da5b139-af5f68d4-5a2b-41d3-9f2c-fe6718f1790e-000000%40eu-central-1.amazonses.com.