#21597: (2006, 'MySQL server has gone away') in django1.6 when wait_timeout 
passed
-------------------------------------+-------------------------------------
     Reporter:  ekeydar@…            |                    Owner:  err
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  1.6
  (models, ORM)                      |               Resolution:
     Severity:  Release blocker      |             Triage Stage:  Accepted
     Keywords:  mysql                |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by jazeps.basko@…):

 Maybe this helps someone like me who uses Django and SQLAlchemy. I was
 experiencing this problem every morning with an API (not used for several
 hours at night) which had `CONN_MAX_AGE=3600` and MySQL server with
 `wait_timeout = 28800`. I even changed settings which are used by
 `manage.py` (to run migrations and collect static assets) to not use
 persistent connections `CONN_MAX_AGE=0`, but the problem persisted. Then I
 noticed that this is actually happening in the code where SQLAlchemy
 accesses DB, so I googled and found this post:
 http://nathansnoggin.blogspot.co.uk/2013/11/integrating-sqlalchemy-into-
 django.html  Followed the instructions in the blog post. Now that my
 SQLAlchemy does not handle connections (just uses whatever Django
 supplies) the problem is gone.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21597#comment:25>
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.2cd5116d8419a4f1005f401e1c8aad8b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to