Hi all, I have been having a problem with MySQL lately on my machine - I apologize for the long post. Specs are:
RedHat Linux 7.3 MySQL 3.23.56, for pc-linux (i686) (same behavior with 4.0.12 as well) Apache 1.3.27 PHP 4.3.1 (most (99%) of the MySQL connections are made through PHP scripts running as an apache module) The problem happens as such: MySQL will be running fine for a day or so, then any connections attempted to MySQL will start to 'hang' - no error messages or connection refused just sitting there trying to connect. After around 10 minutes MySQL will start to return an error message that there are too many connections and the connection has been refused. I assume this is because of all the 'hung' connections that were trying to connect before and were not able to finish. A look at 'mysqladmin processlist' shows a large number of processes (the number of connections set in the my.cnf file) in various states, opening tables, querying, etc. At this point, a look in 'top' will show a single MySQL process spinning at 99.9% of CPU. Any attempts to restart the MySQL server will result in an error such as: 030529 09:13:36 mysqld started 030529 9:13:36 Can't start server: Bind on TCP/IP port: Address already in use 030529 9:13:36 Do you already have another mysqld server running on port: 3306 ? 030529 9:13:36 Aborting There are no other errors listed in the error file for before or during the crash/incident. At this point, a 'kill -9 pid' on the pid of the MySQL process spinning in top has no effect and does not kill the process. I also tried to send it every other signal I could think of with no effect. In order to get MySQL started again I have to do a 'ps -l' to get the parents of the process spinning at 99.9% and kill all of the parents of the processes (except init of course). At this point I am able to restart MySQL and it functions correctly; however, the original MySQL process is still spinning at 99.9% CPU in top and the only way I have found to get rid of this is a server reboot. The last time this happened the process sitting in top was pid 8648. I had the general MySQL log running; however, the only instance of pid 8648 was: 8648 Connect [EMAIL PROTECTED] on 8648 Init DB database 8648 Query SELECT * FROM ad_info WHERE ad_id = 67 8648 Quit This was 3 hours before MySQL got messed up, and I ran the select after MySQL was back online without incident, it is just a simply selection of one row out of a table. This query was not logged to the slow log, which has a long-query-time of 1. Interestingly enough, the process id that MySQL was on and logging at the time of the incident was 14314, way beyond 8648. At this point I'm lost on what to do, any help would be appreciated. -Steven -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]