Re: DBI Connectons accumulate under Mod_perl

2009-10-23 Thread William T
On Tue, Oct 20, 2009 at 9:59 AM, Artem Kuchin wrote: > > however, whe i do in mysql > > show processlist; > > I see many connection hanging in sleep state and they grow and grow slowly! > Any idea why this happens? Could be many things. Maybe multiple hits to different Apache children are openin

RE: DBI Connectons accumulate under Mod_perl

2009-11-09 Thread Kulasekaran, Raja
It's like each child process create a new database process and it remains stable. Instead of establishing a database connection, there is a possibility to share the connection between the child threads using sqlrelay (http://sqlrelay.sourceforge.net/ ). But I have no idea about sqlrelay. Is this i

Re: DBI Connectons accumulate under Mod_perl

2009-11-10 Thread Artem Kuchin
Kulasekaran, Raja: It's like each child process create a new database process and it remains stable. Instead of establishing a database connection, there is a possibility to share the connection between the child threads using sqlrelay (http://sqlrelay.sourceforge.net/ ). But I have no idea abou

Re: DBI Connectons accumulate under Mod_perl

2009-11-10 Thread David E. Wheeler
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

RE: DBI Connectons accumulate under Mod_perl

2009-11-10 Thread Kulasekaran, Raja
rtem 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. Bu

Re: DBI Connectons accumulate under Mod_perl

2009-11-10 Thread David E. Wheeler
On Nov 10, 2009, at 9:19 AM, Kulasekaran, Raja wrote: > 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 ? No, because Apache::DBI turns it into a no-op. Apache::DBI is a very weird beast, with

RE: DBI Connectons accumulate under Mod_perl

2009-11-10 Thread Kulasekaran, Raja
PM To: Kulasekaran, Raja Cc: Artem Kuchin; modperl@perl.apache.org Subject: Re: DBI Connectons accumulate under Mod_perl On Nov 10, 2009, at 9:19 AM, Kulasekaran, Raja wrote: > I'm using Apache::DBI and DBI->connect (persistence connection) > > So, Do I need to call $dbh->disco

Re: DBI Connectons accumulate under Mod_perl

2009-11-11 Thread David E. Wheeler
On Nov 10, 2009, at 9:34 PM, Kulasekaran, Raja wrote: > I'm connecting against oracle. So for every request it establish the > connection and it remains stable even though the request > has been completed successfully . That sounds right, as the Apache process that handles the requests will sti

Re: DBI Connectons accumulate under Mod_perl

2009-11-11 Thread Perrin Harkins
On Tue, Nov 10, 2009 at 10:04 AM, Artem Kuchin wrote: > 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 - > disconne

RE: DBI Connectons accumulate under Mod_perl

2009-11-11 Thread Kulasekaran, Raja
No. I could see that oracle instances are still alive. -Original Message- From: David E. Wheeler [mailto:da...@kineticode.com] Sent: Wednesday, November 11, 2009 11:20 PM To: Kulasekaran, Raja Cc: Artem Kuchin; modperl@perl.apache.org Subject: Re: DBI Connectons accumulate under

Re: DBI Connectons accumulate under Mod_perl

2009-11-11 Thread David E. Wheeler
On Nov 11, 2009, at 6:22 PM, Kulasekaran, Raja wrote: > No. I could see that oracle instances are still alive. That shouldn't be, of course. Did you run the DBI trace mode as Perrin suggested? Best, David

RE: DBI Connectons accumulate under Mod_perl

2009-11-11 Thread Kulasekaran, Raja
or=1RaiseError=1Username=xxx' 32162 Apache::DBI PerlCleanupHandler -Raja -Original Message- From: Perrin Harkins [mailto:phark...@gmail.com] Sent: Wednesday, November 11, 2009 11:26 PM To: Artem Kuchin Cc: Kulasekaran, Raja; modperl@perl.apache.org Subject: Re: DBI Connecton

Re: DBI Connectons accumulate under Mod_perl

2009-11-13 Thread Artem Kuchin
David E. Wheeler: 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 (

Re: DBI Connectons accumulate under Mod_perl

2009-11-13 Thread David E. Wheeler
On Nov 13, 2009, at 1:47 AM, Artem Kuchin wrote: >> 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 >> > Nope, i don't use those. Just plain DBI. Parent process doe

Re: DBI Connectons accumulate under Mod_perl

2009-11-13 Thread Perrin Harkins
On Fri, Nov 13, 2009 at 4:47 AM, Artem Kuchin wrote: > Nope, i don't use those. Just plain DBI. Parent process does not open up any > connections. This is getting really confusing because two of you are on this thread with completely different problems. Artem, if you aren't using Apache::DBI and

Re: DBI Connectons accumulate under Mod_perl

2009-11-13 Thread Perrin Harkins
On Thu, Nov 12, 2009 at 2:22 AM, Kulasekaran, Raja wrote: > Below is the log of $Apache::DBI::DEBUG = 2; This looks fine. I don't think anything is wrong with your setup. I'm guessing Oracle keeps those processes around for a while in case they are needed again. You might want to see if you can

Re: DBI Connectons accumulate under Mod_perl

2009-11-16 Thread Artem Kuchin
Perrin Harkins: On Fri, Nov 13, 2009 at 4:47 AM, Artem Kuchin wrote: Nope, i don't use those. Just plain DBI. Parent process does not open up any connections. This is getting really confusing because two of you are on this thread with completely different problems. Artem, if you ar

Re: DBI Connectons accumulate under Mod_perl

2009-11-16 Thread David E. Wheeler
On Nov 16, 2009, at 1:10 AM, Artem Kuchin wrote: > I am the original poster. Someone else has stolen my thread. > Anyway. > I AM calling disconnect and the thing is wrapped in > sub handler { > my $db=... > > ... > > $db->disconnect(); > } > > So, everything goes out of scope when handle