[Catalyst] Database connections leaking

Kevin Nathan knathan at linux54.com
Sat Dec 22 07:21:00 GMT 2007


On Sat, 22 Dec 2007 15:34:14 +1030
Jon Schutz <jon+catalyst at youramigo.com> wrote:

>It seems to me you would know about it, one way or another, if you had
>3000 apache processes!
>

It would seem so, wouldn't it? :-) From what I remember, though, we
never saw a real increase in port 443 connections.


>I would speculate that the logic in Catalyst::Model::DBI that checks
>whether it currently has an active connection, is not working for
>remote Postgres connections, so it keeps creating new ones.  

That makes sense. I even looked at C::M::DBI, quite a bit, but it just
didn't make it through all my hair-pulling . . .


>I suggest (a) making sure you have the latest version of DBI and DBD::pg and
>postgres libraries, 

I will do that tomorrow, although I'm pretty sure they're fairly current
-- the servers were just built a few weeks ago (Gentoo, from scratch).


>and if that doesn't solve it, (b) add debug into Catalyst::Model::DBI
>stay_connected sub to find out which bit of the logic is causing a
>reconnect.
>

See? Now *that's* what I should have realized! ;-) Even after looking
at that code, it didn't occur to me to add the debug code; of course, I
have debug code all over everything else. Looks like I will be driving
in to work tomorrow . . .


>As I'm not much of a postgres or mod_perl user, I bow out here and let
>the experts take over...
>

Well, I would like to thank you profusely. You've at least helped clear
the cobwebs away from my overworked brain cell and given me a bit of
hope that I'm not entirely out of my depth -- close, but not
completely, yet! :-) Thanks, again.


-- 
Kevin Nathan (Arizona, USA)  
knathan at linux54.com

Open standards. Open source. Open minds. 
The command line is the front line.
Linux 2.6.16.27-0.9-default
 12:08am  up  10:19,  18 users,  load average: 0.33, 1.06, 1.65



More information about the Catalyst mailing list