…+—-+———-+———–+——+———+——+———————————+———————————-+ | 1 | msandbox | localhost | test | Sleep | 403 | | NULL | | 3 … | 0.000002 | | closing tables | …threads can get piled up waiting for table metadata lock bringing down the MySQL…
Post: Load management Techniques for MySQL
One of the very frequent cases with performance problems with MySQL is what they happen every so often or certain times… need to know it is not MySQL problem, might be even not problem with your MySQL configuration, queries and hardware, even though… queries and introducing “sleeps” between them can be a good idea. It also often helps with monopolizing replication thread. For example if…
Post: Ultimate MySQL variable and status reference list
… referring to the amazing MySQL manual, especially the option and variable reference table. …_loopsblogpercona.commanual innodb_table_locksblogpercona.commanual innodb_thread_concurrencyblogpercona.commanual innodb_thread_sleep_delayblogpercona.commanual Innodb_truncated_status_writesblogpercona…
Post: Troubleshooting MySQL Memory Usage
…>> ps.log sleep 60 done Check for Table Cache Related Allocations There are cases when MySQL … all connection buffers and so if you close connection MySQL can clean them up. Killing connections… (318747272 + 128560) Recovery system 0 (0 + 0) Threads 425080 (406936 + 18144) Dictionary memory allocated …
Comment: Debugging sleeping connections with MySQL
…, sleeping threads are a problem. They occur when a connection is requested, but is not closed- the connection is still reserved by that thread… to it”. If the sleep time of a thread exceeds the `wait_timeout` variable for mysql, the connection gets closed and recycled. Until then…
Post: More Gotchas with MySQL 5.0
… of Threads_Running being much higher for MySQL 5.0 compared to MySQL 4.1 It was something like 2-3 for MySQL 4… some locks/latches being responsible for this high amount of threads. It turns out this issue is side effect of the… threads. This theory can be confirmed by the fact using mysqladmin processlist | grep -v Sleep shows much smaller value which is close in MySQL…
Comment: Debugging sleeping connections with MySQL
… the INFO column in processlist is NULL when connection is sleeping (understandable as there is actually no query executing) Therefore, I… in an SQL comment becomes much more useful in these “sleeping thread“, and other scenarios… This would be a VERY powerful feature…, but it was closed as they did not consider it to be worthy of their attention… http://forge.mysql.com/worklog/task…
Comment: Apache PHP MySQL and Runaway Scripts
… queries and the Apache thread seems to continue running permanently. I end up with a lot of Sleeping threads in MySQL and eventually max number of connections is reached! I thought DB connection wasn’t being closed properly, but…
Comment: MySQL Server Memory Usage
…_start’, ’0′ ‘Com_slave_stop’, ’0′ ‘Com_stmt_close‘, ’304204263′ ‘Com_stmt_execute’, ’304205150′ ‘Com_stmt_prepare’, ‘…79, 1.00, 0.95 328 processes: 326 sleeping, 2 running, 0 zombie, 0 stopped CPU states… 32M according to MySQL innodb_additional_mem_pool_size=20M innodb_file_io_threads=4 innodb_lock_…
Post: Using LoadAvg for Performance Optimization
…which are in “running” state or in “uninterruptable sleep” state which typically corresponds to disk IO. You… job on the server with MySQL, Load Average is likely to be close to 1 even if there…locks) or other limiting factors such as innodb_thread_concurrency. The most interesting question I think is…

