On 12/01/16 15:11, Russell Coker via luv-main wrote:

> When running at VPAC the watchdog table in the Drupal database took up 20G of 
> disk space and as it was in the ibdata1 file there was no good option for 
> freeing the space even after deleting most rows.  As part of the migration to 
> the new server I dumped all MySQL databases and imported them.  That solved 
> the disk space problem and as I now have MySQL configured for a file per 
> InnoDB 
> table I will always be able to OPTIMIZE TABLE if I have that happen again.
> 
> echo "delete from watchdog where timestamp < unix_timestamp() - 604800;" | 
> mysql luv_drupal
> 
> The above command is in a cron job to delete the old entries from the 
> watchdog 
> table.  It would be good if we could fix the Drupal problem that's causing 
> those entries (but I don't know how to do it or have time to learn).  It 
> would 
> also be good if we could configure Drupal to not store millions of rows in 
> that 
> table (it's supposed to automatically delete old rows but doesn't).  
> Assistance from Drupal experts is welcome.

Drupal's watchdog table is the default.  It's friendly for small sites
and shared hosting but otherwise is likely to be a poor choice.

You're better off logging to syslog, and configuring syslog to direct
those entries into a separate log file, with appropriate logrotate rules.

https://www.drupal.org/documentation/modules/syslog

If the watchdog table is used, you should have a cron job to clear out
old entries.  Its size shouldn't get to megabytes, let alone gigabytes.
 I think this is part of the default arrangements for drupal.  Is your
drupal cron running at all?

Regards,
Andrew McNaughton
_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

Reply via email to