… not MySQL problem, might be even not problem with your MySQL configuration, queries and hardware, even though fixing these does help in many… single process overloads system too much in this case throttling by having relatively short queries and introducing “sleeps” between them can be…
Post: Fun with the MySQL pager command
… and you want to know how many connections are sleeping, manually counting the rows from the …, it is straightforward: mysql> pager grep Sleep | wc -l PAGER set to ‘grep Sleep | wc -l’ mysql> show processlist; …even write your custom script (if it is too complicated to fit in a single line) …
Post: How to debug long-running transactions in MySQL
… has less than this many MB free. MB_THRESHOLD=100 # Make sure the disk isn’t getting too full. avail=$(df -m… space (${full}%, ${avail}MB free)”>&2 exit 1 fi host=$(mysql -ss -e ‘SELECT p.HOST FROM information_schema.innodb_lock…/tcpdumps/`date +%s`-tcpdump & mysql -e ‘show innodb status\Gshow full processlist’ > /root/tcpdumps/`date +%s`-innodbstatus pid=$! sleep 30 kill ${pid} fi…
Post: Troubleshooting MySQL Memory Usage
… | grep mysqld >> ps.log sleep 60 done Check for Table Cache Related Allocations There are cases when MySQL will allocate a lot… you can do better as you can query temporary tables too: mysql> select sum(data_length+index_length) from information_schema.global… other reasons too. Memory Leaks There are many kinds of memory leaks and I would say these are rather rare in MySQL. Most…
Post: Debugging sleeping connections with MySQL
… timeouts properly. Or may be you have several connections to MySQL server and right now running query which takes that long… with the process are not only helpful to debug sleeping connections with MySQL but many other cases when you see web application locking up or starting to runs in the tight loop consuming too…
Post: SHOW INNODB STATUS walk through
… id 1148250464, thread declared inside InnoDB 442 mysql tables in use 1, locked 0 MySQL thread id 8079, query id 728899 localhost… in InnoDB queue” or “sleeping before joining InnoDB queue”. Latest one is quite interesting – to avoid too many threads competing to enter innodb queue at the same time Innodb makes thread to sleep for some time…
Post: Fighting MySQL Replication Lag
… MySQL Replication unable to catch up is quite common in MySQL world and in fact I already wrote about it. There are many aspects of managing mysql replication lag such… becomes too large. This is a bit more complicated approach but it saves you from running around and adjusting your sleep behavior…
Comment: Master-Master or Master with Many Slaves
…10+ slaves replicating 500GB database. Regarding good night sleep, well it depends a lot on number …their search being down so many times I think it is not MySQL related at all. “Sure… but…too many slaves using replication Instead of partitioning. By the way, how many shards do you have and how many…
Post: Predicting how long data load would take
…asked many times during last week, and there is really no easy answer. There are just way too many…and copy it back in a binary form. MySQL Configuration Different storage engines have different settings which…usually tend to do something like “du -sh; sleep 3600; du -sh” in the database data …
Post: Using LoadAvg for Performance Optimization
… which are in “running” state or in “uninterruptable sleep” state which typically corresponds to disk IO. You … run single batch job on the server with MySQL, Load Average is likely to be close to … is as good as site is down. There are too many variables to come with exact numbers but generally …

