Alert Thresholds to avoid watchdog table grow excessively

Christoph C. Cemper - July 27, 2007 - 08:33
Project:Drupal
Version:5.1
Component:watchdog.module
Category:feature request
Priority:critical
Assigned:Unassigned
Status:won't fix
Description

Over the last 2 weeks I've had problems on three sites with the exact same problem.

The watchdog table grew FASTER than the cron job (retention 3 days) would have deleted it.

This ended in a "device full" last night when one watchdog table became 5 gigs.

Now, it's obvious that disk full problems shouldn't be a problem for Drupal to take care about, but the sys manager.
However, this particular situation IS an application problen inherent to Drupal.

The REASON the table grew so fast was, that the table "cache" was marked as crashed/corrupt and hence I bet EVERY httpp requests
caused several tries to read/write from/to the cache table.

One must agree that it makes NO SENSE to dump a "table .... marked as crashed" several hundred times PER SECOND into the watchdog,
and I therefore urgently want to request redesign or addon-implementation of some kind of alert threshold.

Options:

Simple minded design: "If an error message was sent 100 times in the last hour, chances are the next 120,000 won't add any information to it, so supress this watchdog entry"

Fancy design: - like the simple minded, but various levels definable by a) Severity b) component (i.e. PHP vs. applciation errors)

Whatever solution deems appropriate,
the current situation of Drupal filling it's own watchdog with useless entries
leading to a halting server (because mysql tables after often placed on /var partitions, which also carry system log file)
is not an operable solution.

Let me know what you think.

#1

kbahey - July 27, 2007 - 13:22
Status:active» won't fix

In Drupal 6, the limit is on the number of rows to keep, not on rows older than X days.

So, this problem is solved for 6.x.

For 5.1, there is a patch that ports the new hook_watchdog from 6.x to 5.1.

Since it is marked as won't fix, I am marking this issue the same way.

 
 

Drupal is a registered trademark of Dries Buytaert.