Hello, everything is running smooth, but sometimes (very often) I get this message on a pink square on my homepage, before login in:

user warning: Lock wait timeout exceeded; Try restarting transaction query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'access denied', 'node', 1, '', 'http://www.myweb.com/mydrupal/', '', '84.64.23.XXX', 1174752297) in /usr/local/psa/home/vhosts/myweb.com/httpdocs/mydrupal/includes/database.mysql.inc on line 172.

...anybody knows why and how to fix it?.

Comments

timothyf’s picture

I've run into this problem as well, though it doesn't happen very regularly. From what I've been able to tell, it seems to have something to do with using locking on InnoDB tables. If you don't need a table to use InnoDB (and watchdog is probably one of those) then changing it to MyISAM might fix it. Here's what I found:

http://archives.neohapsis.com/archives/mysql/2004-q4/2755.html
http://dev.mysql.com/doc/refman/5.0/en/innodb-deadlocks.html

danieltome’s picture

I'm getting hundreds of these warnings. Do you think changing it to MyISAM will fix this error? What repercussions will it do if I change it to MyISAM?

[Mon Apr 28 15:21:53 2008] [error] [client x.x.x.x] PHP Warning: Lock wait timeout exceeded; try restarting transaction\nquery: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (3090, 'php', '<em>Lock wait timeout exceeded; try restarting transaction\\nquery: UPDATE sessions SET uid = 3090, cache = 0, hostname = &amp;#039;x.x.x.x&amp;#039;, session = &amp;#039;lastvisited_nodes|a:1:{s:4:\\\\&amp;quot;lvn1\\\\&amp;quot;;s:2:\\\\&amp;quot;17\\\\&amp;quot;;}search_site|a:6:{s:6:\\\\&amp;quot;photos\\\\&amp;quot;;a:18:{i:0;a:4:{s:5:\\\\&amp;quot;title\\\\&amp;quot;;s:26:\\\\&amp;quot;page - x\\\\&amp;quot;;s:7:\\\\&amp;quot;snippet\\\\&amp;quot;;s:313:\\\\&amp;quot; \\\\r\\\\n \\\\r\\\\n x &amp;lt;strong&amp;gt;Photos&amp;lt;/strong&amp;gt; \\\\r\\\\n \\\\r\\\\n \\\\r\\\\n \\\\r\\\\n \\\\r\\\\n \\\\r\\\\n xxx /export/projects/newsspace/htdocs/includes/database.mysql.inc on line 172