#21597: (2006, 'MySQL server has gone away') in django1.6 when wait_timeout 
passed
-------------------------------------+-------------------------------------
     Reporter:  ekeydar@…            |                    Owner:  nobody
         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:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by andreis):

 Hi Jeroen!
 It seems like adding CLIENT.INTERACTIVE flag just tells the driver to
 switch from checking on wait_timeout to taking interactive_timeout into
 account. I set interactive_timeout=10 and was able to reproduce this
 problem.
 Both of these values are 8 hours by default, but once your code has been
 inactive for that long, mysql drops the connection and the client fails
 next time it tries to access some data. It looks perfectly right to catch
 this error in the code, call django.db.close_connection() every time or
 whatever, but I think that maybe connection persistence logic needs a bit
 of fine-tuning so that we can control persistence without relying on
 signals.request_started/request_finished.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21597#comment:14>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.1eeb01f9757990eba69f4a85b53330e6%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to