Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Turn on slow queries, that will give you an idea of what is taking so long to execute that there is a timeout.</p> <p><a href="http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html</a></p> <p>Pick the slowest query and optimise that. then run for a while and repeat.</p> <p>There is some excellent information and tools here <a href="http://hackmysql.com/nontech" rel="nofollow noreferrer">http://hackmysql.com/nontech</a></p> <p>DC</p> <p>UPDATE:</p> <p>Either you have a network problem causing the timeout, if you are using a local mysql instance then that is unlikely, OR something is locking a table for far too long causing a timeout. the process that is locking the table or tables for far too long will be listed in the slow log as a slow query. you can also get the slow log query to display any queries that fail to use an index resulting in an inefficient query. </p> <p>If you can get the problem to occur while you are present then you can also use a tool like phpmyadmin or the commandline to run "SHOW PROCESSLIST\G" this will give you a list of what queries are running while the problem is occurring.</p> <p>You think the problem is in your insert statement, therefore something is locking that table. therefore you need to find what is locking that table, therefore you need to find what is running so slow its locking the table for far too long. Slow queries is one way to do that.</p> <p>Other things to look at</p> <p>CPU - is it idle or running at full pelt</p> <p>IO - is io causing holdups</p> <p>RAM - are you swapping all the time (will cause excessive io)</p> <p>Does the table product_search_query use an index? </p> <p>What is the primary key? </p> <p>If your index uses strings that are too long? you may build a huge index file that causes very slow inserts (slow query log will also show that) </p> <p>And yes the problem may be elsewhere, but you must start somewhere mustn't you.</p> <p>DC</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload