I thought .. cool .. something to help my site performance. I installed it ..and.. instead it messed my site up.

I am running on mysql 4.1.16-standard ... drupal 4.7.4 ... PHP 4.3.9 (cgi) (built: Apr 25 2006 22:46:16)

The result was that on logging into my site it would behave very badly - e.g. the river-of-news on the front page would show nodes, but they'd all show as "n/a" rather than any content. And one time I was greeted with "Welcome to your new Drupal Site, to begin create your first user account and begin creating content" .. or whatever that message says. That really shocked me.

The fix is to go to each table and do "REPAIR TABLE xyzzy". As I do the REPAIR's the site functionality comes back and eventually is restored. Hopefully nothing is lost.

But this is obviously horribly wrong for these OPTIMIZE things to also crap out the tables so that they have to be REPAIR'd.

Is there something known that might be the cause on my end .. such as MySQL or PHP version?

Comments

deekayen’s picture

Category: bug » support

Unless you're doing lots of node deletion, there's probably not a good reason to have db maintenance run on your node tables during every cron run. The tables are locked when mysql does optimizing, so you probably should wait and optimize content tables during down times and more infrequently. I've never really been clear if the lock is a write only or read/write, but your issue makes it sound like a read/write lock. I would assume if you switch from MyISAM to InnoDB tables, re-indexing there would be handled more cleanly.

OPTIMIZE is meant for tables where there is lot of data movement. Skim it down to stuff like accesslog, history, sessions, or watchdog.

More info on OPTIMIZE:
http://dev.mysql.com/doc/refman/4.1/en/optimize-table.html

I'll leave this open for now. Please close if the issue is resolved.

deekayen’s picture

Status: Active » Closed (fixed)

stale issue