List:Bugs« Previous MessageNext Message »
From:Thimble Smith Date:March 9 2000 3:54am
Subject:Re: Mysql connect bug
View as plain text  
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
>and reconnects.
>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
one place.

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
-- 
Tim Smith   < tim@stripped >  :MySQL Development Team:  Boone, NC  USA.
Thread
Mysql connect bugJanek Hiis8 Mar
  • Re: Mysql connect bugsasha9 Mar
  • Re: Mysql connect bugThimble Smith9 Mar
    • Re: Mysql connect bugJanek Hiis9 Mar