[wp-trac] [WordPress Trac] #5932: wpdb should reconnect and retry query when "MySQL server has gone away"
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 26 14:07:22 UTC 2010
#5932: wpdb should reconnect and retry query when "MySQL server has gone away"
--------------------------------------------+-------------------------------
Reporter: dtc | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Database | Version: 3.0
Severity: normal | Resolution:
Keywords: database, error, mysql, server |
--------------------------------------------+-------------------------------
Comment(by andy):
If you know of a configuration that fixes this then it's a configuration
issue. Until then, your assumption is no reason to close this ticket.
Typically this error occurs when the mysql client connection has timed out
due to inactivity. This is correct behavior and not necessarily within the
power of the WP admin to configure.
It is also easy to recover from: identify the error code, reconnect, and
retry the query. I have implemented this in wpdb-based scripts that
commonly see deadlocks (another recoverable error). A do-while loop works
well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/5932#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list