… | grep mysqld >> ps.log sleep 60 done Check for Table Cache Related Allocations There are cases when MySQL will allocate a lot… max_packet_size per connection) are all connection buffers and so if you close connection MySQL can clean them up. Killing connections (or stopping related applications…
Post: How to debug long-running transactions in MySQL
…-plugin InnoDB versions, you can’t reliably figure out what connection is to blame for blocking others. You can guess, and…/`date +%s`-tcpdump & mysql -e ‘show innodb status\Gshow full processlist’ > /root/tcpdumps/`date +%s`-innodbstatus pid=$! sleep 30 kill ${pid} fi If this… server to find idle-in-transaction connections that are just sitting there doing nothing, and kill them if you can’t make…
Post: Ultimate MySQL variable and status reference list
… amazing MySQL manual, especially the option and …Compressionblogpercona.commanual concurrent_insertblogpercona.commanual connect_timeoutblogpercona.commanual Connectionsblogpercona.commanual …thread_concurrencyblogpercona.commanual innodb_thread_sleep_delayblogpercona.commanual Innodb_truncated_…
Post: Apache PHP MySQL and Runaway Scripts
… – they take Apache Slot, MySQL Connection and other resources. I had discussion today who was thinking Apache would kill the script after “Timeout… long time. For simplicity I did not use MySQL, but other system call – sleep() which has similar behavior for sake of experiment… some cleanup work – for example you can open another MySQL connection to kill the query which was running (otherwise query may well continue…
Post: MySQL for Hosting Providers - how do they manage ?
…”,1000000); select sleep(1); SET @a12:=repeat(“a”,1000000); select sleep(1); SET @a13:=repeat(“a”,1000000); select sleep(1); … Causes MySQL to “leak… number) Now remove sleep(1) and you will get mysqld quickly running out of memory and being killed by OOM killer or… to select from the table. Any user with permission to connect to MySQL Server can crash it.
Comment: Debugging sleeping connections with MySQL
… and kills really old sleeping connections. my.cnf: wait_timeout=180 # = 30min php cron script: #!/usr/bin/php -q 1000 && $row['Command'] == “Sleep“) && ($row['User'] != “Root”)) { $killed = 0; mysql…
Comment: MySQL for Hosting Providers - how do they manage ?
… they are running the same query same connection ID. Kill that connection. That should clear out the deadbeats. If… | NULL | Query | 3 | init | select sleep(10) | +—–+——+———–+——+———+——+——-+———————–+ 2 rows in set (0.00 sec) mysql> kill 282 You could also…
Post: How to use tcpdump on very busy hosts
… can skew results dramatically. Imagine a situation where a single connection sends two queries and gets two responses, with a response… $TMP/$LOCKFILE # run the tcpdump & write to remote file and sleep for a bit tcpdump -i eth0 -s 65535 -x -n…’ 2>/dev/null \ | ssh $REMOTEHOST — “cat – > $TMP/$TMPfile” & PID=$! sleep $SLEEPTIME kill $PID # set trap to be sure both remote files are…
Post: Living with backups
…= 1; while(1) { if ($is_running == 0 && $was_running == 1) { kill 19, $pid; $was_running= 0; } if ($is_running == 1 && $was_running == 0) { kill 18, $pid; $was_running= 1; } … my $sth= $dbh->prepare(‘SHOW GLOBAL STATUS LIKE “Threads_connected“‘); … if ($$row…) { last; } sleep(1); } What this script does is to check MySQL status every second and in case the number of connected threads goes…
Comment: MySQL Server Memory Usage
…_insert’, ’17889656′ ‘Com_insert_select’, ’11′ ‘Com_kill‘, ’47′ ‘Com_load’, ’0′ ‘Com_load_master….00, 0.95 328 processes: 326 sleeping, 2 running, 0 zombie, 0 …mysql/mysql.pid datadir=/db/disk2/mysql/data log-bin=/var/log/mysql/log log-slow-queries=/var/log/mysql/slow-queries.log max_connections…

