in reply to Objects, Object Handlers and mod_perl

I think the basic deal is that by connecting in startup.pl you are then passing the same connection to each Apache child when each spawns so then they are all trying to use the same connection which just screws things up. On the other hand if you connect inside the handler then each child makes it's own connection which is the way it's meant to be.. 8)

cheers,

J

  • Comment on Re: Objects, Object Handlers and mod_perl

Replies are listed 'Best First'.
Re: Re: Objects, Object Handlers and mod_perl
by perrin (Chancellor) on Jun 05, 2003 at 15:21 UTC
    That's right. You can't share a socket across a fork like that. Take a look at Apache::DBI's connect_on_init() instead.