I am fastidous about finish statements after each query and have automated the db disconnects at the end of my perl script. I have no persistent connections. All code is perl with no client side code.
Yet mysql runs very slowly with a lot of sleeping connections.
I am seeing a lot of sleeping connections in show processlist that run for extremely long time after perl exits. Even after restarting mysql it loads up pretty quickly
I am running mysql 5.1.73 on redhat linux VM. All except one of my tables are InnoDB
the code runs serially with no child processes and no more than one query being executed at a time.
wait_timeout is set to default 28800 which is obviously ridiculous. I would rather not solve the problem by killing connections since I have a couple of nighttime cron functions that take a long time to run.
It seems to me that if the connections are not closing as they should when I finish/disconnect there might be something else going on. It there by any chance a bug in 5.1.73 where mysql disconnects are not processed?
Any ideas?
In reply to Sleeping mysql connections after finish and disconnect by drusher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |