PDA

View Full Version : MySQL Error: Lock wait timeout exceeded


milleniumstudio
09-08-2010, 10:07 AM
I have vBulletin 4.0.3 on MySQL 5.0.32 and sometimes get these errors:

Database error in vBulletin 4.0.3:

Invalid SQL:

REPLACE INTO vb_searchlog
(userid,ipaddress,searchhash,sortby,sortorder,sear chtime,dateline,completed,criteria,results)
VALUES
(...)

MySQL Error : Lock wait timeout exceeded; try restarting transaction
Error Number : 1205
Request Date : (...)
Error Date : (...)
Script : /search.php?do=getnew&contenttype=vBForum_Post
Referrer : (...)
IP Address : (...)
Username : (...)
Classname : vB_Database_MySQLi
MySQL Version :


What's the cause and to solve them?

Marco van Herwaarden
09-08-2010, 10:55 AM
What is the "innodb_lock_wait_timeout" set to in the MySQL config?

Videx
09-09-2010, 02:19 AM
And can we assume the CPU loads around the times of the errors are acceptable? Is this shared hosting?

milleniumstudio
09-09-2010, 08:37 AM
innodb_lock_wait_timeout is set to 50. The average total queries per second is 34. Do you think increasing timeout will do?

Marco van Herwaarden
09-09-2010, 10:34 AM
Should already be enough. Most likely another process locking things up. Try to get a innodb ststus when this happens.