[wp-trac] [WordPress Trac] #5932: wpdb should reconnect and retry query when "MySQL server has gone away"
WordPress Trac
noreply at wordpress.org
Sun Feb 2 22:07:30 UTC 2014
#5932: wpdb should reconnect and retry query when "MySQL server has gone away"
----------------------------+-----------------------
Reporter: dtc | Owner: pento
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 3.9
Component: Database | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+-----------------------
Changes (by nacin):
* keywords: has-patch 3.9-early => needs-patch
Comment:
I've committed this but I don't think it's quite done.
The one remaining concern I have here is that the page could already be
building when this error occurs. At the moment, the query would fail, was
would all after it, but the page could still hypothetically finish
building. With this patch, though, two things occur: we cease execution
immediately and we call wp_die(), which could potentially ugly up a pre-
existing page.
So, a few options:
* Should wp_die() and dead_db() be smarter about whether a pageload is
underway? wp_die() already checks for admin_head() to avoid re-issuing
some things, but that's particularly because we sometimes use wp_die() in
the admin after the header is printed. That wouldn't quite be the case
here.
* Perhaps we should wp_die() only if we've yet to hit the wp_head action,
otherwise just silently fail the query?
Also, I left the string untranslated for the moment, so we can make some
adjustments if necessary.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/5932#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list