Re: "Too many connections" fix?

From: Date: Wed, 01 Oct 2003 20:18:13 +0000
Subject: Re: "Too many connections" fix?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164619@lists.php.net to get a copy of this message
--- Nicole <430ntr3k@aeontrek.com> wrote: > I run Apache with PHP and MySQL [snip] > > I last increased my max connections to 500. That seemed to fix things > for a while. Now I am getting the problems (database freezing up > because too many connections) again. The site I run is pretty high > traffic. This has nothing to do with traffic (other than the fact that heavy traffic can reveal configuration problems more easily). Are you using persistent connections (mysql_pconnect)? If so, you need to make sure you have MySQL maximum connections (max_connections in my.cnf) set to a number that is higher than Apache's MaxClients directive (in httpd.conf). If you have MaxClients at 512, for example, and MySQL only allows a maximum of 500 connections, you're likely to run into the "too many connections" problems once your traffic pushes the number of Apache clients past 500. Hope that helps. Chris ===== HTTP Developer's Handbook http://shiflett.org/books/http-developers-handbook My Blog http://shiflett.org/

« previous php.general (#164619) next »