lark wrote:
>>John Nagle wrote:
>>
>>> I'm load-testing a dedicated server by making 20 CGI requests
>>>at the same time, and I'm getting an occasional
>>>
>>> MySQL database error 2013:
>>> Lost connection to MySQL server during query
>>>
>>>The server is running Linux (Red Hat Fedora 5) and MySQL 5.
>>>
>>>The MySQL server and client are on the same machine, so there shouldn't
>>>be a network error. MySQL isn't crashing. The requests aren't large
>>>and each one affects only one table row. About 1 in 50 requests fails.
>>>
>>>20 simultaneous requests shouldn't be overloading anything, although
>>>the server does go compute-bound.
>>>
>>>I've read
>>> http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
>>>and none of the problems there seem to apply.
>>>
>>> John Nagle
>
>
> that's odd. i ran the perror on 2002 and 2003 and 2013 but every time it returned
> illegal code.
"perror" is for UNIX "errno" values, which are a completely different
numbering system.
> i remember i had this same problem a while back. it turned out that i had some
> corrupted files on myisam and innodb databases. are you sure there is no
> corruption of data files? to be sure, try to access all of your objects including
> views and/or stored procedures you may have.
Unlikely. This error is showing up when first establishing the
connection to the database server.
Retrying connections seems to work well. I haven't been able to force
this error in load testing since I set up the code to retry connections at
1 second intervals if the initial attempt fails. It's not happening once
a connection has been established. (Remember, this is a local host
connection on the same machine; there shouldn't be any errors.)
John Nagle