[wp-testers] "Categories" 2 bug under the Dashboard.
Ryan Boren
ryan at boren.nu
Fri Mar 21 07:39:35 GMT 2008
On Thu, Mar 20, 2008 at 11:58 PM, Ryan Boren <ryan at boren.nu> wrote:
> Background on the lost connection error.
>
> http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
>
> I recall some people on Windows servers putting mysql_ping loops
> before each query to help with lost connection errors. Doing a
> mysql_ping before each query slows things down though. See ticket
> 5951.
>
> http://trac.wordpress.org/ticket/5951
>
> I can try cooking up a patch that does a mysql_ping if a query returns
> an errno of CR_SERVER_GONE_ERROR or CR_SERVER_LOST. That'll avoid
> doing a mysql_ping every time. I don't know if that will help, but
> it's worth a try.
http://trac.wordpress.org/ticket/6305#comment:13
I modifed wp-db.php to attempt to reconnect when the lost connection
error occurs. A new version of wp-db.php can be downloaded here:
http://trac.wordpress.org/attachment/ticket/6305/wp-db.php?format=raw
Replace your existing wp-includes/wp-db.php with that.
I couldn't test this completely since my server works fine, so we
might need to tweak it a bit. It works for me with successful
queries, errors other than lost connections, and simulated lost
connection errors.
More information about the wp-testers
mailing list