Re: Apache::DBI & MySQL

1999-10-14 Thread Ed Phillips


Even with MySQL, persistent connections are a performance boost, although you need to 
have a reason to use them. That is, only open a persistent connection when you have 
determined that you will use that connection enough to make a difference. Other 
connections may be better, as Ken said, one-time.

Ed



Re: Apache::DBI & MySQL

1999-10-14 Thread Stas Bekman

>   I included the command "PerlModule Apache::DBI" in my mod_perl Apache 
> configuration files. Yet, over time there builds up more connection in 
> mysql than apache processes (only Apache/CGI should be accessing MySQL) and 
> most processes seem to have very high "Time"s under the "sleep" stat when I 
> do a 'processlist' in mysql. Please advise.

http://perl.apache.org/guide/databases.html#Apache_DBI_Initiate_a_persist


___
Stas Bekman  mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas  
Perl,CGI,Apache,Linux,Web,Java,PC at  www.singlesheaven.com/stas/TULARC
www.apache.org  & www.perl.com  == www.modperl.com  ||  perl.apache.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: Apache::DBI & MySQL

1999-10-13 Thread Perrin Harkins

Viren Jain wrote:
> 
> I included the command "PerlModule Apache::DBI" in my mod_perl Apache
> configuration files. Yet, over time there builds up more connection in
> mysql than apache processes (only Apache/CGI should be accessing MySQL) and
> most processes seem to have very high "Time"s under the "sleep" stat when I
> do a 'processlist' in mysql. Please advise.
>   -- Viren

If ANYTHING is different in your connect string, Apache::DBI will keep a
separate connection open.  You probably have slight variations in your
connect strings.
- Perrin



Re: Apache::DBI & MySQL

1999-10-13 Thread Ken Williams

Do you really need the persistent connections when using mysql?  Since mysql is
so fast to connect, I've just been using regular DBI connection methods.  I
have one connection opened per request, and when the request is done, the
connection gets closed.  It's fast enough for me, you should do your own tests.

I'm not sure why you have too many connections.  Sounds pretty odd.


[EMAIL PROTECTED] (Viren Jain) wrote:
>   I included the command "PerlModule Apache::DBI" in my mod_perl Apache 
>configuration files. Yet, over time there builds up more connection in 
>mysql than apache processes (only Apache/CGI should be accessing MySQL) and 
>most processes seem to have very high "Time"s under the "sleep" stat when I 
>do a 'processlist' in mysql. Please advise.
>  -- Viren
>

  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum