On Thu, Dec 14, 2000 at 09:34:58AM -0800, Michael Peppler wrote: > Tim Bunce writes: > > > > Was there a problem with ping on DBD::Sybase? > > Has it been resolved? > > I believe that ping() was fixed in 0.90. Thanks Michael. Tim. > > ----- Forwarded message from Jie Gao <[EMAIL PROTECTED]> ----- > > > > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > > Delivered-To: mailing list [EMAIL PROTECTED] > > X-Authentication-Warning: solo.ucc.usyd.edu.au: jiegao owned process doing -bs > > Date: Thu, 14 Dec 2000 23:19:40 +1100 (EST) > > From: Jie Gao <[EMAIL PROTECTED]> > > To: mod_perl list <[EMAIL PROTECTED]> > > Subject: Re: is morning bug still relevant? > > In-Reply-To: <[EMAIL PROTECTED]> > > Organisation: The University of Sydney > > Telephone: +61 (0)2 9351 5769(W) > > Fax: +61 (0)2 9351 5001(W) > > X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > > > > On Thu, 14 Dec 2000, Tim Bunce wrote: > > > > > On Thu, Dec 14, 2000 at 11:47:58AM +1100, Jie Gao wrote: > > > > On Thu, 14 Dec 2000, Stas Bekman wrote: > > > > > > > > > I think that this item from the guide is not relevant anymore. Can I > > > > > kill it? > > > > > > > > > > =head3 The Morning Bug > > > > > > > > > > Relational database server keeps a connection to the client open for a > > > > > limited period of time. Many developers were bitten by so called > > > > > B<Morning bug>, when every morning the first users to use the site > > > > > received a C<No Data Returned> message, but after that everything > > > > > worked fine. The error is caused by C<Apache::DBI> returning a handle > > > > > of the invalid connection (the server closed it because of a timeout), > > > > > and the script was dying on that error. The infamous C<ping()> method > > > > > > Why is/was ping() infamous? > > > > > > > > was introduced to solve this problem, but still people were being > > > > > bitten by this problem. Another solution was found - to increase the > > > > > timeout parameter when starting the SQL server. Currently I startup > > > > > C<MySQL> server with a script C<safe_mysql>, so I have modified it to > > > > > use this option: > > > > > > > > > > nohup $ledir/mysqld [snipped other options] -O wait_timeout=172800 > > > > > > > > > > (172800 seconds is equal to 48 hours. This change solves the problem.) > > > > > > > > > > Note that as from version C<0.82>, C<Apache::DBI> implements ping() > > > > > inside the C<eval> block. This means that if the handle has timed out > > > > > it should be reconnected automatically, and avoid the morning bug. > > > > > > > > Problem is it is not only relevant, but ping doesn't work in all cases. > > > > I have to cron-kill/start my servers in the morning. > > > > > > With what database driver? > > > > > > Some drivers don't support ping others might be buggy. It's not helpful > > > to say "ping doesn't work in all cases" without qualifiying why and/or > > > which drivers that applies to. > > > > OK, fair enough. It's DBD::Sybase. I have posted the problem to dbi-users > > and nobody had a solution to it. > > > > Regards, > > > > > > Jie > > > > ----- End forwarded message -----