[Django] #36964: Documentation incorrectly states that persistent connections don't work with runserver

2 views
Skip to first unread message

Django

unread,
5:23 AM (9 hours ago) 5:23 AM
to django-...@googlegroups.com
#36964: Documentation incorrectly states that persistent connections don't work
with runserver
-------------------------------------+-------------------------------------
Reporter: Adam Sołtysik | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 5.2 | 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
-------------------------------------+-------------------------------------
From https://docs.djangoproject.com/en/5.2/ref/databases/#caveats:

> The development server creates a new thread for each request it handles,
negating the effect of persistent connections. Don’t enable them during
development.

Something here seems to be incorrect. I'm using `'CONN_MAX_AGE': None`
with the development server, and it works as expected. My requests are
significantly faster than with the default setting. When analyzing with
`SELECT * FROM pg_stat_activity WHERE datname = '<dbname>'`, I can see a
single connection created and persisting after the first request, and it
disappears after autoreload.
--
Ticket URL: <https://code.djangoproject.com/ticket/36964>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
12:45 PM (1 hour ago) 12:45 PM
to django-...@googlegroups.com
#36964: Documentation incorrectly states that persistent connections don't work
with runserver
-------------------------------------+-------------------------------------
Reporter: Adam Sołtysik | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mankameshwar Mishra):

I’d like to work on a documentation patch for this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/36964#comment:1>
Reply all
Reply to author
Forward
0 new messages