[development] Watchdog dieing on large queries

Miriam Natanzon miriam at mail.snunit.k12.il
Thu Apr 23 12:19:46 UTC 2009


I also have this problem.

Any Solution??
It caused me a timeout and then "MySQL server has gone away" response
message...

-----Original Message-----
From: development-bounces at drupal.org
[mailto:development-bounces at drupal.org]On Behalf Of Steven Surowiec
Sent: Wednesday, April 22, 2009 7:12 PM
To: development at drupal.org
Subject: [development] Watchdog dieing on large queries

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