Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-02 Thread Henri Asseily
Apache::DBI overrides disconnect() to be a no-op, and connect_cached() doesn't. (But Apache::DBI doesn't do this during startup.) It would be reasonable for Apache::DBI to provide a way for applications to call disconnect() and have it actually disconnect. If you want another hack :-), ch

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-02 Thread Tim Bunce
On Wed, Feb 01, 2006 at 02:06:22PM -0800, Tyler MacDonald wrote: > Perrin Harkins <[EMAIL PROTECTED]> wrote: > > > You have to expect certain basic things to work, and one of them is that a > > connection which can't be ping'ed is not holding a table lock. > > I completely disagree. Here's

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread michael . peppler
> > > For this purpose, "connected" and "pingable" are the same thing. > > > > Yes and no. If you can't ping the server, but the TCP socket is > > still open, that means you essentially have this TCP connection to the > > server that's not being used, in an open state, for the rest of the lifet

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Perrin Harkins
Tyler MacDonald wrote: DBI will replace it, removing all references to the one that failed to ping, and it will go out of scope and get DESTROY'ed. And what if you don't want to reconnect? The possibly still connected, possibly not handle is still left around in {CachedKids}. Why woul

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Tyler MacDonald
Mark Galbreath <[EMAIL PROTECTED]> wrote: > and...? > > ]:-) And at this point it sounds like there's more resistance than support for my particular flavour of bulletproofing of Apache::DBI, so I'm not going to bother, but I'm more than happy to keep arguing about it. I like a good argum

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Mark Galbreath
and...? ]:-) >>> Tyler MacDonald [EMAIL PROTECTED]> 01-Feb-06 17:06 PM >> Yeah, I ditched Apache::DBI early in diagnosing this problem. Then I wrote that hack to solve it, which is what has started this whole thread. I was happy just posting the hack and leaving it at that, but you guys kee

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Tyler MacDonald
Perrin Harkins <[EMAIL PROTECTED]> wrote: > > And here's some more conjecture: What if the ping just times out > > because the server is really, really busy? > DBI will replace it, removing all references to the one that failed to > ping, and it will go out of scope and get DESTROY'ed.

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Perrin Harkins
On Wed, 2006-02-01 at 14:06 -0800, Tyler MacDonald wrote: > What if you > can't ping the connection because of a temporary TCP/IP problem [...] > And here's some more conjecture: What if the ping just times out > because the server is really, really busy? DBI will replace it, removing

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Perrin Harkins
On Wed, 2006-02-01 at 13:22 -0800, Tyler MacDonald wrote: > The point here was that I *wanted* the disconnect() to take place. > So I made sure Apache::DBI wasn't loaded when disconnect() was called before > the fork, so that it wouldn't trump my attempt to disconnect the handle > owned by th

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Perrin Harkins
On Wed, 2006-02-01 at 11:27 -0800, Tyler MacDonald wrote: > I am opening a handle before apache forks. However, I was > able to verify that Apache::DBI wasn't loaded yet at that point (no > $INC{'Apache/DBI.pm'}), and I was issuing a disconnect() before the fork > took place. If Apac

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Tyler MacDonald
Perrin Harkins <[EMAIL PROTECTED]> wrote: > > Yes and no. If you can't ping the server, but the TCP socket is > > still open, that means you essentially have this TCP connection to the > > server that's not being used, in an open state, for the rest of the lifetime > > of your apache server ins

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Tyler MacDonald
Perrin Harkins <[EMAIL PROTECTED]> wrote: > > I am opening a handle before apache forks. However, I was > > able to verify that Apache::DBI wasn't loaded yet at that point (no > > $INC{'Apache/DBI.pm'}), and I was issuing a disconnect() before the fork > > took place. > If Apache::DBI w

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Tyler MacDonald
Perrin Harkins <[EMAIL PROTECTED]> wrote: > I've never seen Apache::DBI or connect_cached return a dead handle. I > have had problems in the past with forking apps where I get back a > handle that still pings but has been shared across processes so it no > longer really works. Were you doing s

Re: mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-02-01 Thread Tim Bunce
On Tue, Jan 31, 2006 at 01:23:12PM -0800, Tyler MacDonald wrote: > Apache::DBI and DBI's connect_cached both claim to keep your database > handles fresh and happy, but I've had numerous problems trying to get either > of them to work properly. If a database connection is dropped, sometimes I'd > ha

mod_perl2 DBI handle freshining problem solved "once and for all"...

2006-01-31 Thread Tyler MacDonald
Apache::DBI and DBI's connect_cached both claim to keep your database handles fresh and happy, but I've had numerous problems trying to get either of them to work properly. If a database connection is dropped, sometimes I'd have to refresh the page two or three times before the "internal server err