> We have a number of sites running on a server with several sites of
> Freetrade design. Recently I'm getting this error: "Too many connections"
> for the mySQL server. I'm using 'pconnect'. The amount of traffic to the
> mySQL server isn't huge, it just seems that pconnect is creating too many
> processes
>
> After checking 'show processlist' I see that most if not all of these
> processes describe the 'Command' in 'sleep' mode. My question is, do I
> change the 'wait_timeout' and or 'interactive_timeout' in an attempt to
> decrease the number of processes, or just increase the 'max_connections'.
It
> don't want to change pconnect to connect for fear of creating another
> problem later with system resources.
>
> Any help would really be appreciated.

You can probably get away with switching to mysql_connect without much
penalty.  Connecting to the MySQL server is really fast.  Rasmus added
ora_pconnect way back when because connecting to Oracle is really slow, and
somehow the function got implemented for most of the other databases.

Dropping wait_timeout is a good idea.  (If I remember right,
interactive_timeout only applies to connections marked as interactive, such
as with the shell).  The default is 8 hours (28800 seconds).  Also, look at
max_connections.  This is limited by the number of file descriptors you can
use, which varies by OS.  It can be as low as 255.

Are you running on Apache installation with many virtual servers, or are you
running an installation for each site?  That could affect PHP's connection
pooling.

Leon


_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev

Reply via email to