Re: "Too many connections" fix?
| From: | Chris Shiflett | Date: | Thu, 02 Oct 2003 04:17:09 +0000 |
| Subject: | Re: "Too many connections" fix? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164680@lists.php.net to get a copy of this message | ||
--- Nicole <430ntr3k@aeontrek.com> wrote:
> So I switched to connect, with no luck in fixing the "too many
> connections" problem.
Now that's some helpful information. The first thing you need to do is forget
about persistent connections being the problem.
I don't claim to be an expert at debugging MySQL issues such as this, but I
have always found Jeremy Zawodny's mytop to be a very handy tool:
http://jeremy.zawodny.com/mysql/mytop/
Using this tool, you might notice some hung query, and you will be able to view
the specific SQL statement that is causing problems (for whatever reason). If
you are not using persistent connections and getting a "too many connections"
message, it means you have at least one situation that results in a connection
to MySQL to remain open, possibly even after the Apache child process
terminates (a crash, perhaps?).
Hope that helps.
Chris
=====
HTTP Developer's Handbook
http://shiflett.org/books/http-developers-handbook
RAMP Training Courses
http://www.nyphp.org/ramp
My Blog
http://shiflett.org/