1

I am using WordPress with MySQL. My site recently crashed (due to some out-of-memory problem with the database)

Once the site was up, it seemed fine, but just in case I ran "repair" (from phpmyadmin) on the DB. After that, it crashed my "wp_posts" table. I restored the DB from an older version, again - the table seemed fine. Again, I ran the "repair" and the same table crashed.

I am on a VPS server. So I don't have root access, but I can ask the web admins to check things.

Any idea what might be causing this / how to solve it?

Thanks.

1 Answer 1

1

This is a MySQL server configuration problem. I've had the same problem. In my case it was due to a MySQL system variable called myisam_sort_buffer_size being set to an absurdly small value (4096). This interfered with the repair table operation. In my case, the wp_posts file and others used the MyISAM access method. If yours use InnoDB, you'll want to look at the variables controlling that access method rather than MyISAM.

Issue this command to your MySQL server:

show  variables like '%buffer_size'

Then look for variables which seem low.

You may also want to look at the MySQL server error log file.

If you run the server yourself, please be careful making configuration changes: Read the doc page first. http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html

If your hosting provider runs the server, put in a request ticket, ask that it be escalated to a support person who knows about MySQL, and be specific about what is going wrong.

3
  • Hi Ollie, thanks for the answer. My DB (and tables) use MyISAM. The support guy ended up running: "myisamchk" which seemed to have not ruined the table, and after that running normal repair seemed to have worked. Does that make sense to you? (in terms of your reply)
    – Tal Galili
    Commented Feb 7, 2015 at 14:40
  • 1
    Yes, it does. It sounds like your table was corrupt, and it wasn't (in your case) a server misconfig. It's good to have backups, eh?
    – O. Jones
    Commented Feb 7, 2015 at 14:44
  • Why can "myisamchk" do something that the "normal" repair can not?
    – Tal Galili
    Commented Feb 7, 2015 at 14:48

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.