…> show processlist; 5 Sleep 2 Connect 1 Query 8 rows in set (0.00 sec) No more entries for ‘Command‘ or blank…
Post: Fun with the MySQL pager command
…, counting the number of sleeping connections can be done with: mysql> SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND=’Sleep‘; +———-+ | COUNT(*) | +———-+ | 320 | +———-+ and… done with: mysql> SELECT COMMAND,COUNT(*) TOTAL FROM INFORMATION_SCHEMA.PROCESSLIST GROUP BY COMMAND ORDER BY TOTAL DESC; +————-+——-+ | COMMAND | TOTAL | +————-+——-+ | Sleep | 344 | | Query | 5…
Comment: Debugging sleeping connections with MySQL
…/thread-commands.html Even the program “mytop”, which displays the current commands being processed by the server, ignores threads with the Sleep command, I believe for the same reason. I can see how a thread with a Command of “Query” could be a problem if it has a large Time value, but I don’t think Sleep commands are…
Post: Debugging sleeping connections with MySQL
….1.92:11211 ESTABLISHED 28540/php-cgi Using same netstat command and filtering on the PID we can find which connections… also could see some of the variables in GDB “bt” command output which also hinted what could be the problem. By… happening with the process are not only helpful to debug sleeping connections with MySQL but many other cases when you see…
Post: Be productive with the MySQL command line
… | | ALTER VICTORY | | AMADEUS HOLY | –Plus– Another example of the pager command is when you want to estimate a good size for… PAGER set to ‘grep sequence’ mysql> show engine innodb status\Gselect sleep(60);show engine innodb status\G Log sequence number 380166807992 1… record the queries that you have executed. The command line client offers the tee command, which will log to a file the…
Comment: An argument for not using mysqldump
… be done by the MySQL SLEEP command. See As restoring a dump table into the MySQL master – you better get some sleep
Comment: MySQL for Hosting Providers - how do they manage ?
… | NULL | Query | 3 | init | select sleep(10) | +—–+——+———–+——+———+——+——-+———————–+ mysql> show full processlist; +—–+——+———–+——+———+——+——-+———————–+ | Id | User | Host | db | Command | Time | State | Info…
Post: Percona Toolkit by example - pt-stalk
…(–daemonize). $ pt-stalk –sleep=3600 –threshold=0 –iterations=…9 #+—–+———-+———–+—-+———+——+——-+——————+ #| Id | User | Host | db | Command | Time | State | Info | #+—–+———-+———–+—-+———+——+——-+——————+ # trg_…
Comment: Debugging sleeping connections with MySQL
… really old sleeping connections. my.cnf: wait_timeout=180 # = 30min php cron script: #!/usr/bin/php -q 1000 && $row['Command'] == “Sleep“) && ($row['User...['db'].”, which had a time of “.$row['Time'] .”, and a command of “.$row['Command'].”\r\n\r\n”; } } } @mysql_close($link); ?>

