Hi Everyone,
I am running a web service powered by PHP/MySQL and recently noticed a strange issue.
When I run "show full processlist;" SQL command via SSH terminal, I notice several "sleeping" connections:
| Id | User | Host | db | Command | Time | State | Info |
+-----------+---------+-----------+---------+---------+------+-------+-----------------------+
| 218121282 | test_user | localhost | test_db | Sleep | 0 | NULL | NULL |
Are these "Sleeping" connections happening because of not using mysql_close() at the end of scripts?
If this is the reason, can I solve this issue by using "register_shutdown_function" PHP function and running mysql_close() on the callback function?
Thanks for your suggestions.