On Thu, 31 Aug 2000, Aaron Johnson wrote:

> I don't work on Oracle so I will speak from my experience with MySQL.  MySQL
> servers time out after the 8 hour standard disconnect for inactivity (this
> can be adjusted in your my.conf file).  To compensate for this we now run our
> own connect checks for a valid dbh handle before it goes it all the trouble
> to make one along with Apache::DBI

In fact there is no need for a ping, I don't see why don't you just make
the timeout long enough so it'd never time out. I use 48 hours:
http://perl.apache.org/guide/databases.html#The_Morning_Bug


> We have not had any more issues with the database connects since we moved to
> this method.  We do a ping and validate the dbh handle rather then blindly
> accessing the dbh handle since Apache::DBI will only validate the dbh handle
> on a connect.
> 
> Aaron Johnson
> 
> Perrin Harkins wrote:
> 
> > On Thu, 31 Aug 2000 [EMAIL PROTECTED] wrote:
> > > What I think is going on is that the script gets killed by Oracle for
> > > being idle and tries to ping the connection, but the ping fails.
> >
> > It is supposed to reconnect when the ping fails.  I've had problems
> > getting reconnects to Oracle 8 working.  The "solution" we ended up with
> > was to make processes that can't reconnect send an error page and
> > exit.  New processes are able to connect.  I'm not sure what causes this
> > problem.
> >
> > Since your problem is caused by your processes being idle for too long,
> > this may go away when you move out of testing mode into a public release.
> > You might want to tweak your MinSpareServers settings so that you won't
> > have lots of idle processes hanging around.
> >
> > > >Rebild your mod_perl with the EVERYTHING=1 flag.  That will get rid
> > > of the >above error message.
> > >
> > > So I have to re-install it?  Is there anything I need to do when I
> > > rebuild it?  Or do I just need to reinstall mod_perl as it's done in
> > > the documentation?
> >
> > Just rebuild it and re-install as it shows in the docs.
> >
> > - Perrin
> 
> 



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org


Reply via email to