perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <>
Subject Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")
Date Mon, 30 Jun 2008 21:27:12 GMT
On Mon, Jun 30, 2008 at 1:40 PM, Tobias Kremer <> wrote:
> Could you please show me the exact line in my example in which I put the
> database handle in a
> global during startup?

On a closer look, you're not.  You are keeping around your $foo
closure variable in handler(), as well as putting it in a global.
It's not obvious why that causes this problem.  If you want to
determine whether Apache::DBI is malfunctioning for you in some way,
I'd suggest just removing it and seeing if the problem goes away.
Your test app should work fine without it.

> There's even an example in
> the Mason docs that recommends this approach

I know, but it's still a bad idea, IMO.  The Mason docs advise a
similar approach for using sessions and people are constantly having
problems with their session object not getting cleaned up.

- Perrin

View raw message