I'm using Apache::DBI and DBI->connect (persistence connection) So, Do I need to call $dbh->disconnect() for each child to close the connection ?
Raja . -----Original Message----- From: David E. Wheeler [mailto:da...@kineticode.com] Sent: Tuesday, November 10, 2009 10:43 PM To: Artem Kuchin Cc: Kulasekaran, Raja; modperl@perl.apache.org Subject: Re: DBI Connectons accumulate under Mod_perl On Nov 10, 2009, at 7:04 AM, Artem Kuchin wrote: > You mean each child process creates a new database CONNECTION (not process) ? > The process is just one multhreaded mysql. But this is exactly what i want. I do not want any > connection sharing because of the locking issues (lock tables). But they still accumulate and after a > couple of hours mysql runs out of connections. The weirdest thing is that there are two sites, running > pretty much the same software (minor changes to user part, no changes to db part). Connections > from one site accumulate, connection from other site do not accmulate - disconnect work fine. Might you have connections starting in parent processes and not getting dropped? Are you using Apache::DBI or DBI->connect_cached or DBIx::Connector? Best, David