How to troubleshoot MySQL Error 1040: Too many processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need a little direction for troubleshooting a problem 
I'm having with PHP and MySQL.

Twice recently my little homebrew PHP/MySQL content 
management system has essentially crashed when MySQL 
starts returning a 1040 error: "Too many connections." 
Restarting MySQL fixes things ... for a little while 
at least.

Currently I am trying to manage the situation by 
monitoring the process count and restarting mysqld 
whenever the count gets high, but I need to get a 
better handle on what is going on.

I'm running Apache 1.3.27, PHP 4.1.2, and MySQL 
3.23.41.

Most of my connections are made with PHP's 
mysql_pconnect.

My understanding is that each Apache/PHP process will 
reuse a connection made with mysql_pconnect. 

If so -- and assuming one db connection per http 
response -- I would expect there to be a 
correspondance between the number of Apache processes 
and mysqld processes. 

This isn't the case. One day after restarting MySQL and 
httpd, Apache has 21 processes running and mysqld has 
62 processes. Is this an indication of a problem or am 
I barking up the wrong tree?

Any other suggestions for troubleshooting?

Thanks in advance,

--John

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux