PDA

View Full Version : What is causing all these sleeping MySQL processes?


styleforum1
Fri 6th Jul '07, 11:09pm
My forum was acting really slow, so I went and ran mytop:


http://img63.imageshack.us/img63/1218/sleepingprocsms8.gif

What is causing all these processes to sit and sleep forever?

If I set the wait_timeout low, I get tons of "mysql server went away" errors in my email. It's set to 1800 right now just to avoid that. Is there something that's not killing these processes correctly?

Thanks.

eva2000
Sat 7th Jul '07, 9:44am
how low have you set wait_timeout to ? i'd try a value of say 45 to 50 seconds given the times in that processlist.

make sure max_allowed_packets is set at 64M though.

styleforum1
Tue 10th Jul '07, 5:53pm
I set it to 50 and now there are fewer long-sleeping processes, but I am getting the server went away emails again. Isn't the wait-timeout supposed to kill sleeping processes? Is something else wrong with my MySQL config?

Thanks.

eva2000
Thu 12th Jul '07, 9:22am
for server gone a way.. you have to keep raising wait_timeout by 30 second increments until it goes away (restart mysql after changing my.cnf settings).

wait_timeout will only end it after the timeout value specified as per

The number of seconds the server waits for activity on a non-interactive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made via named pipes, or shared memory.

On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()). See also interactive_timeout.

interactive_timeout

The number of seconds the server waits for activity on an interactive connection before closing it. An interactive client is defined as a client that uses the CLIENT_INTERACTIVE option to mysql_real_connect(). See also wait_timeout.

but you shouldn't be concerned with a just a few sleeping processes that's normal

maybe post all info asked at http://www.vbulletin.com/go/tweak