#23462: Django 1.7 openning one database connection for each request
-------------------------------------+-------------------------------------
Reporter: upmauro | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: mysql | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by shaib):
Since you do see the connection being closed (according to your own debug
info), I suspect that the problem is that you are opening more than one
connection per request.
The common reason for this to happen is that the application opens a
separate thread and does some database queries in it.
Another possibility is that you do something in a middleware's
`process_response()` -- this could open another connection on the same
thread after the "main" connection has been closed.
In summary - try to debug the opening of connections, not just the
closing.
--
Ticket URL: <https://code.djangoproject.com/ticket/23462#comment:8>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.8ee4eace6909a83cc48dece29cbf5fac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.