On 30.06.2008, at 17:10, Perrin Harkins wrote:
It's not Apache::DBI that's caching it -- you're caching it. Don't
put a database handle in a global before you fork. It will stay, and
there's nothing Apache::DBI can do about it.
Could you please show me the exact line in my example in which I put
the database handle in a
global during startup? To me it looks like I'm correctly _declaring_ a
global variable ($dbh) on
server startup, but the connect happens in the handler() subroutine.
There's even an example in
the Mason docs that recommends this approach:
http://masonhq.com/?FAQ:ServerConfiguration#h-how_do_i_connect_to_a_database_from_mason_
And this all works great - without _any_ errors at all! It's not until
I start adding my preloading
stuff which fetches some stuff from the database during startup with a
supposedly independent not-cached
handle which should have got nothing to do with my global $dbh that
the errors crop up.
Thank you very much! :)
--Tobias