I'm dumping the database every 2 days, but I noticed that at some point last month the database jumped from around 500 MB to 4 GB!
What can be the cause of it?
I'm dumping the database every 2 days, but I noticed that at some point last month the database jumped from around 500 MB to 4 GB!
What can be the cause of it?
One reasons that a database can grow w/o bound is when you don't have cron setup to run. Check your "Recent Log messages" at /admin/reports/dblog and filter for cron, and make sure it is running (nightly is a good start).
On of the things cron does is prune the cache, watchdog, and sessions tables. These can fill up quickly with data that isn't critical to Drupal running.
Occasionally, clearing these out can take too long for a cron run. If this is the case, running a manual query, such as
DELETE FROM watchdog;
may be needed. As mentioned above, you can run this on the cache
and tables beginning with cache_
, watchdog
, and sessions
. It is always best to take a backup first, before running DELETE
queries.
Run
show table status;
on your database, and take a look at the "Data_length" column. There you will see which tables take up the space. I don't know how you dump your data, but if you use Backup and Migrate, the cache tables are by default not included, saving quite a bit of space.
If you have drush installed, run drush cron followed by drush cc all. That should fix the problem. Just reduced my db size from 4.3G to 65M.