Debugging sleeping connections
Sleeping connections are not running queries, sleeping connections represent connections that the client/app failed to close successfully, most of the time due to bad programming practices (developers nos closing connections after querying the DB) or bad connectors configuration (not sending a close connection signal or even using an old/outdated connector).
Most of the cases this is not a big issue, but sometimes connection pool can grow out of control a represent a real hazard for real new requests traying to create new connections to the DB, so the best approach to &quot;fix&quot; this issue is to review the application/client and send a close() to the connection or check the connector.
You can also play with wait_ timeout variables to limit the time sleeping connections can remain active.