develooper Front page | perl.dbi.users | Postings from March 2005

Re: hang with mysql in execute

Thread Previous | Thread Next
From:
Chris Masters
Date:
March 24, 2005 01:24
Subject:
Re: hang with mysql in execute
Message ID:
20050324092404.81182.qmail@web50510.mail.yahoo.com
Hi All,

The 'proper' solution IMO is Peter's first suggestion.
The firewall is doing it's job and forced wrapper
timeouts can be a bit of a bodge.

We're lowering the inactivity timeout on our data
source servers (MySQL and openLDAP - we're seeing the
same thing on both connections) to around 5 minutes -
no real reason why it should be higher. Our client
code will then be able to detect a gracefully
terminated connection and reconnect without a hang.

Thanks for everyones help on this.

Chris

--- "Peter J. Holzer" <hjp@wsr.ac.at> wrote:
> On 2005-03-23 07:26:35 -0600, Jones Robert Civ TTMS
> Keesler wrote:
> >      If this is due to a timeout issue then you
> want to increase the timeout
> > settings on your system.  That would be something
> you will need to configure
> > on the client side in the OS settings.  
> 
> No, he would have to configure that on the firewall:
> 
> > > > A firewall is terminating my connection with a
> mysql
>       ^^^^^^^^^^
> > > > database after a period of inactivity.
> 
> The firewall is probably not under his control,
> though (Even if it is,
> it may not be feasible to increase the timeout to a
> large enough value).
> 
> The best solution is probably to use some keepalive
> mechanism. TCP
> keepalive would be the simplest, but there is no
> obvious way to enable
> it on either the client or the server side, so he
> has to change his
> application to issue a dummy query every $n minutes.
> 
> 
> 	hp
> 
> -- 
>    _  | Peter J. Holzer \Beta means "we're down to
> fixing misspelled comments in
> |_|_) | Sysadmin WSR     \the source, and you might
> run into a memory leak if 
> | |   | hjp@wsr.ac.at     \you enable embedded
> haskell as a loadable module and
> __/   | http://www.hjp.at/ \write your plugins
> upside-down in lisp". --ae@op5.se
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About