List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:May 13 2011 10:59am
Subject:Re: problem
View as plain text  
----- Original Message -----
> From: "Gavin Towey" <gtowey@stripped>
> 
> The server will disconnect idle connections after a while.  The
> wait_timeout variable controls how many seconds it will wait.  You
> can set it for your connection when you connect by issuing a query
> like:
> 
> SET SESSION wait_timeout=NNN;
> 
> Just give it a large enough value.

That will, of course, work; but it has as side effect that improperly terminated
connections (application crash, ...) will stay around for that time, too.

It is better to have your connection (-pooling) code be aware of connection timeouts, and
have it transparantly reconnect. If I recall correctly, the client library has a ping()
function or something similar.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
Thread
problemswaroop jois2 May
  • Re: problemAndrĂ©s Tello2 May
    • Re: problemCarlos Proal3 May
  • RE: problemGavin Towey12 May
    • Re: problemJohan De Meersman13 May