#21597: (2006, 'MySQL server has gone away') in django1.6 when wait_timeout
passed
-------------------------------------+-------------------------------------
Reporter: ekeydar@… | Owner: aaugustin
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: mysql | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):
* severity: Release blocker => Normal
Comment:
It has been suggested to call close_if_unusable_or_obsolete before
handling each HTTP request. However, I don't think that makes much sense.
If the connection to MySQL times out between two HTTP requests, you should
either stop using persistent connections (with CONN_MAX_AGE = 0) or
increase wait_timeout. I don't like the idea of adding overhead to Django
to compensate for inconsistent settings.
What I don't understand is that you tried CONN_MAX_AGE = 0 and that didn't
help. I fail to see why closing the connection before each request would
help if closing it after each request does nothing. Theoretically closing
after a request is a safer behavior than closing before the next request
-- you never run into timeouts. Could you double-check your tests?
--
Ticket URL: <https://code.djangoproject.com/ticket/21597#comment:42>
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/075.d68a1be68514fd8f44a10be4054ffeda%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.