Show running MySQL queries without idle connections
mysql high load | which query is hanging | show mysql process list | mysql | mariadb | processes | performancemysql -e "SELECT id, user, db, time, state, LEFT(info, 100) AS query FROM information_schema.processlist WHERE command <> 'Sleep' ORDER BY time DESC;"Reads the process list and hides sleeping connections. It shows ID, user, database, runtime in seconds, state and the first 100 characters of the query. The first thing to check under high database load or when pages hang.
Note: SHOW FULL PROCESSLIST; shows the complete list including idle connections. On Plesk servers, run it as admin.
Also searched as
- mysql high load
- which query is hanging
- show mysql process list