0

I have a problem on a WP site. Website crashes because there is no more available disk space.

Searching, i detect that wp_options table size is 12GB, but only have 1100 rows aprox:

enter image description here

Any ideas? Thanks in advance

[UPDATE 1] If i export wp_options table, drop and import, sizes reduces at 9,7mb:

enter image description here

I had no opportunity to optimize the table with OPTIMIZE TABLE wp_options but I will try it if it happens again

[UPDATE 2] Problem still here. I try to OPTIMIZE TABLE wp_options;without results:

enter image description here

  • It's not possible to tell with just what you've got in the question, you'll need to look through the table to see if any of those optioons have really big values, then see what the option name is, the prefix/name will give clues as to the plugin/theme responsible – Tom J Nowell Jun 23 at 8:41
  • Out of interest what did you use to see the size of the tables? It doesn't make sense that 1100 rows would be 12Gb, unless somehow something put 12Gb in one row, if that's even possible. You could backup, drop and reload the table perhaps to try to clear this issue. There's also MySQL OPTIMIZE TABLE command, which may clear up any weird issues to do with free space not being reclaimed – mozboz Jun 23 at 8:43
  • If i export table, drop and import backup, size reduces drastically to 9,7mb. i.gyazo.com/c86676a4e1a507f4389c3ff31081bf73.png – 50l3r Jun 23 at 11:46
0

This issue seems to be present no quite a small sites. Has anyone else experienced it and is the database optimization the only solution?

| improve this answer | |
  • I installed the WP_OPTIMIZE plugin and it has not happened again. In addition to this, Wordpress backups are done externally with scripts in bash – 50l3r Jul 13 at 10:06
0

I'd be interested to validate what you're looking at there to make sure it really is that table. MySQL shouldn't behave like this unless you actually have 12Gb in a row somewhere. But if you can run SQL on this database, maybe you want to try MySQL OPTIMIZE TABLE command which asks MySQL to see if it can optimize the storage for a table. So you could try running the query:

OPTIMIZE TABLE wp_options;

If that doesn't work, please post full screenshot of why you think it's this table, and say if you're able to run e.g. mysqlbackup as dropping and restoring the table could be an option.

EDIT: Did a bit more searching and this may be a known issue depending on some InnoDB setup in MySQL. More information and potential setting to change here: https://www.ibm.com/support/pages/mysql-tables-grow-very-large-even-though-purger-enabled

| improve this answer | |
  • I have fixed the problem recreating the table but it will possibly happen again. As soon as the size starts to increase I will try to perform the optimization – 50l3r Jun 23 at 11:51
  • I still have the problem. i.gyazo.com/a382414592d840cdfdb05aa8619ff3ff.png I try to optimize table without results – 50l3r Jun 28 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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