PDA

View Full Version : Sleeping processes


twomt
07-20-2007, 06:03 PM
Hello,

can someone tell me why there are sleeping processes in MySQL.
Are these looping items or so?

I have for example several :

| 25046 | user | localhost | database | Sleep | 179 | | NULL |

I guess resulting in the following errors :

Warning: mysql_connect() [function.mysql-connect]: Too many connections

Now, how do I found out what this means and then how do I prevent these?

Many thanks,
twomt.

twomt
07-22-2007, 10:02 PM
OK,

seems this is a though one as nobody has been able to give me any hints.
I have done some extensive research and located a good description of my issue and I thought I share it in case someone else runs into this problem as well.

http://bugs.mysql.com/bug.php?id=11897

So, my solution is an upgrade of MySQL to possibly 5.0 ( I think 5.1 is not a fully tested release yet ).

At the same time I'll set the wait_timeout from 28800 to something like 20 and tune the number of needed connections by setting this value to what I need (default: 100).

that kept the system kind of running although not performing optimal and now we'll upgrade.

Any hints/tips on how to best proceed with an upgrade?