I was checking out one of my Drupal sites and noticed that the watchdog table is > 3GB. I have plenty of space but it seems a big. Are there any best practices in regards to maintaining this table? I have run and cleared the cache.

1 Answer 1


Make sure that cron is running, that should clean that out the watchdog table regularly.


Drupal has a setting that controls how many rows should be kept, which you can configure at:

Drupal 6: /admin/settings/logging/dblog

Drupal 7: /admin/config/development/logging

Additionally, you should check what kind of logs you have in that table. Maybe a module or something is causing a lot of notices which are all logged there (And considerable slow down your site!)

You can of course simply truncate the table, but you should first figure out why it's not getting cleaned and what is filling it up like that. How many rows are there?

  • I changed my watchdog to 100 rather than 1000. After this I ran cron then ran optimize of the table (MySQL). Down to 62.5 KiB.
    – Jeff
    Commented May 9, 2011 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.