My Mysql seems to keep regularly crashing due to many processes being opened and staying in sleep for 600+ seconds and not closing. Anyone know how i can get it to close these sleep processes after 600 seconds ?
Well sleeping processes would be coming from people making persistent connections. So in your my.cnf you could do something like mysql.allow_persistent=Off . As for a way to make them time out after x amount of seconds I'm unsure on there's timeout or in mysql5 connect-timeout. But I'm unsure if that works on persistent connections.
Sleeping processes are usually caused by your code not properly closing connections. To lower the timeout edit your my.cnf and add/change "wait_timeout=600" For most of my applications I set this to ~120 seconds.