On Mon, 2006-01-16 at 12:39 -0800, Tyler MacDonald wrote: > Thanks.... after looking over the messages in the (rather large) > thread this has spawned over the weekend, I played around a little bit, and > found I had a package that was cacheing it's database handle in a global. I > ended up writing a InitHandler that runs once per request that throws away > *that* cached copy ($DBH = undef), so that Apache::DBI can do it's job > properly.
That sounds like it should work fine. > Even with this change, I still have to hit reload a few times for > the handle to reconnect, but at least it actually does recover eventually... > before I could hit reload 1,000 times with no change. :) It should re-connect on the first try. Maybe there's something about the order in which you're doing things, i.e. you are clearing the global too late to help the current request. Switching your code to a cleanup handler (so that the global is undef *before* the start of the request) would fix that if it is the problem. - Perrin