Intentionally get a "MySQL server has gone away" error
Posted
by
Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2011-11-24T08:54:29Z
Indexed on
2011/11/27
17:49 UTC
Read the original article
Hit count: 259
I'm trying to cope with MySQL's error MySQL server has gone away
in a django env.
The quick workaround was to set the global wait_timeout
MySQL variable to a huge value, but in the long run this would accumulate to many open connections.
I figured I'll get the wait_timeout
variable and poll the server in smaller intervals. After implementing this I tried to test it but am failing to get the error.
I set global wait_timeout=15
and even set global interactive_timeout=15
but the connection refuses to disappear. I'm sure I'm polling the database in larger intervals than 15sec.
What could be the cause for not being able to recreate this error?
© Stack Overflow or respective owner