perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Kuchin <mat...@itlegion.ru>
Subject Re: DBI Connectons accumulate under Mod_perl
Date Tue, 10 Nov 2009 15:04:46 GMT

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 issue resolved in Mod_perl 2.0? . I have read the article
> "DB::Pool". Can anyone help me out on this.
>
>
>   

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.


> -----Original Message-----
> From: Artem Kuchin [mailto:matrix@itlegion.ru] 
> Sent: Tuesday, October 20, 2009 10:29 PM
> To: modperl@perl.apache.org
> Subject: DBI Connectons accumulate under Mod_perl
>
> Hello!
>
> I have a very weird situation. I use MYSQL. Apache 2.2 with mod_perl2
>
> O use Modperl::RegistryBB to run the script, but the script itself is
> written very nicely
> for mod_perl. That is no globals at all. Everything is in sub handler.
> I do not use Apache::DBI, just plain "use DBI;"
>
> So, what it does (basic idea)
>
> sub  handler {
>     db->connect();
>
>     .. does all the thing...
>
>     db->disconnect();
>
>     print $output;
>
> }
>
> 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?
>
> Artem
>
>
>
>   

-- 
С уважением,
Артем Кучин
Компания "Ай Ти Легион"
www.itlegion.ru
www.hostilla.ru
+7 (495) 232-0338



Mime
View raw message