[development] Watchdog dieing on large queries

Steven Surowiec steven at digitalpulp.com
Wed Apr 22 16:12:26 UTC 2009


I've found a workaround for myself for this one but just wanted to put 
it out there. When a query fails watchdog is used to insert it into the 
DB, which is fine 99.9% of the time, until that .1% bites you. The 
problem is that if the query (say inserting a new record into the 
"cache") causes a query that is larger than the MySQL query buffer 
limit. This results in a MySQL error that the query is too large to 
insert, which watchdog then picks up and tries to insert, which fails, 
which watchdog picks up ... and you get the point. Result? Infinite loop 
and then either a timeout or PHP runs out of memory and dies. I'd think 
the proper way to handle this would be to have a check that the specific 
error code for a MySQL error resulting from a query buffer violation 
doesn't try to insert the query, again just putting this out there.


More information about the development mailing list