On Wed, Mar 08, 2000 at 01:19:37PM +0200, Janek Hiis wrote:
>when connecting to another machine and the other end gives
>connection timeout then the client says that
>ERROR 2013: Lost connection to MySQL server during query
>when doing that query again the client says that
>ERROR 2006: MySQL server has gone away
>Can it be done so that the client reconnects right away?
>when the connection timeout is small then I must enter
>every request twice...
Janek, I think that your performance isn't affected much in
this case (since you have to make the connection again anyway,
it should take almost no time for the first attempt to fail).
I would recommend that in your query wrapper function you check
to see if the query failed because of a timeout; if it did, then
send the query again before reporting success/failure. If you
do it in a wrapper function, you only have to worry about it in
For performance reasons, you might want to increase your timeout
so that the majority of your sessions do not time out. Of course
there may be a few that will be idle for a long time, but then
of course they are not executing in time-critical loops!
Tim Smith < tim@stripped > :MySQL Development Team: Boone, NC USA.