… 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: Debugging sleeping connections with MySQL
… and you’re not dealing with timeouts properly. Or may be you have several connections to MySQL server and right now running query… it has couple of memcached connections. Few MySQL connections (to the same host, which if usually bad idea) and connection to some external web… happening with the process are not only helpful to debug sleeping connections with MySQL but many other cases when you see web application…
Post: How to debug long-running transactions in MySQL
… block and fail with a lock wait timeout. The problem is, it can be very…s`-tcpdump & mysql -e ‘show innodb status\Gshow full processlist’ > /root/tcpdumps/`date +%s`-innodbstatus pid=$! sleep 30 kill …watch your server to find idle-in-transaction connections that are just sitting there doing nothing,…
Post: Apache PHP MySQL and Runaway Scripts
… Apache Slot, MySQL Connection and other resources. I had discussion today who was thinking Apache would kill the script after “Timeout” specified in… long time. For simplicity I did not use MySQL, but other system call – sleep() which has similar behavior for sake of experiment…
Comment: Debugging sleeping connections with MySQL
Russell, sleeping threads are a problem. They occur when a connection is requested, but is not closed- the connection is still reserved by… statement to it”. If the sleep time of a thread exceeds the `wait_timeout` variable for mysql, the connection gets closed and recycled. Until…
Comment: Debugging sleeping connections with MySQL
… connections to last over 30 min, or you can have a cron script that checks the db 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: Why do you need many apache children ?
… article. Timeout setting in httpd.conf do great harm to so many mysql connections in sleep state for so long time(wait_timeout). Original timeout was set to default (300 seconds). Some terribly slow http connection consumes timeout…
Comment: MySQL Server Memory Usage
… average: 0.79, 1.00, 0.95 328 processes: 326 sleeping, 2 running, 0 zombie, 0 stopped CPU states: cpu user…/log/mysql/log log-slow-queries=/var/log/mysql/slow-queries.log max_connections=650 open_files_limit=6144 max_connect_errors=10000 interactive_timeout=3600 wait_timeout=3600 key…
Comment: What to tune in MySQL Server after installation
…07, 1.02 Tasks: 191 total, 1 running, 190 sleeping, 0 stopped, 0 zombie Cpu0 : 0.0% us, …thread_concurrency thread_concurrency = 16 set-variable=max_connections=2000 [mysql.server] user=mysql basedir=/var/lib [mysqld_safe] err-…256M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout
Post: Using LoadAvg for Performance Optimization
…in “running” state or in “uninterruptable sleep” state which typically corresponds to disk… job on the server with MySQL, Load Average is likely to …workload scales linearly with number of connections and CPUs (ie there are no…slow responding site until their browsers timeout, which is as good as site…

