The MU forums have moved to WordPress.org

Database corruption (8 posts)

  1. mikeatkc
    Member
    Posted 18 years ago #

    My main blog page now displays the below code along with the page.

    WordPress database error: [Got error 127 from storage engine]
    SELECT option_value FROM wp_1_options WHERE option_name = 'rewrite_rules' LIMIT 1

    WordPress database error: [Duplicate entry '135-0-rewrite_rules' for key 1]
    INSERT INTO wp_1_options (option_name, option_value, option_description, autoload) VALUES ('rewrite_rules', 'a:59:{s:11:\"robots.txt$\";s:18:\"index.php?robots=1\";s:12:\"wp-atom.php$\";s:19:\"index.php?feed=atom\";s:11:\"wp-rdf.php$\";s:18:\"index.php?feed=rdf\";s:11:\"wp-rss.php$\";s:18:\"index.php?feed=rss\";s:12:\"wp-rss2.php$\";s:19:\"index.php?feed=rss2\";s:12:\"wp-feed.php$\";s:19:\"index.php?feed=feed\";s:20:\"wp-commentsrss2.php$\";s:34:\"index.php?feed=rss2&withcomments=1\";s:20:\"(about)/trackback/?$\";s:35:\"index.php?pagename=$matches[1]&tb=1\";s:40:\"(about)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:35:\"(about)/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:28:\"(about)/page/?([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&paged=$matches[2]\";s:20:\"(about)(/[0-9]+)?/?$\";s:47:\"index.php?pagename=$matches[1]&page=$matches[2]\";s:27:\"about/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:37:\"about/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:57:\"about/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\"about/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:32:\"feed/(feed|rdf|rss|rss2|atom)/?$\";s:27:\"index.php?&feed=$matches[1]\";s:27:\"(feed|rdf|rss|rss2|atom)/?$\";s:27:\"index.php?&feed=$matches[1]\";s:20:\"page/?([0-9]{1,})/?$\";s:28:\"index.php?&paged=$matches[1]\";s:41:\"comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?&feed=$matches[1]&withcomments=1\";s:36:\"comments/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?&feed=$matches[1]&withcomments=1\";s:29:\"comments/page/?([0-9]{1,})/?$\";s:28:\"index.php?&paged=$matches[1]\";s:44:\"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?s=$matches[1]&feed=$matches[2]\";s:39:\"search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?s=$matches[1]&feed=$matches[2]\";s:32:\"search/(.+)/page/?([0-9]{1,})/?$\";s:41:\"index.php?s=$matches[1]&paged=$matches[2]\";s:14:\"search/(.+)/?$\";s:23:\"index.php?s=$matches[1]\";s:52:\"blog/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:47:\"blog/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:40:\"blog/category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:22:\"blog/category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:52:\"blog/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?author_name=$matches[1]&feed=$matches[2]\";s:47:\"blog/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?author_name=$matches[1]&feed=$matches[2]\";s:40:\"blog/author/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?author_name=$matches[1]&paged=$matches[2]\";s:22:\"blog/author/([^/]+)/?$\";s:33:\"index.php?author_name=$matches[1]\";s:74:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:80:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:69:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:80:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:62:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:81:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]\";s:44:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:63:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]\";s:61:\"blog/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:56:\"blog/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:49:\"blog/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:65:\"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]\";s:31:\"blog/([0-9]{4})/([0-9]{1,2})/?$\";s:47:\"index.php?year=$matches[1]&monthnum=$matches[2]\";s:48:\"blog/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?year=$matches[1]&feed=$matches[2]\";s:43:\"blog/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?year=$matches[1]&feed=$matches[2]\";s:36:\"blog/([0-9]{4})/page/?([0-9]{1,})/?$\";s:44:\"index.php?year=$matches[1]&paged=$matches[2]\";s:18:\"blog/([0-9]{4})/?$\";s:26:\"index.php?year=$matches[1]\";s:62:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$\";s:85:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&tb=1\";s:82:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]\";s:77:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]\";s:70:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$\";s:98:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&paged=$matches[5]\";s:62:\"blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$\";s:97:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]\";s:52:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:62:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:82:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:77:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:63:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:73:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:93:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:88:\"blog/[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";}', '', 'yes')

    Additionally, once login as admin, I'm getting errors on most pages, with the following header, follows by messages.

    WordPress database error: [Got error 127 from storage engine]

    SELECT * FROM wp_1_options WHERE option_name NOT LIKE 'rss%' AND option_name NOT LIKE '%user_roles'

    UPDATE wp_1_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins'

    I restored the database from its previous state and check the ownership and permission, and it all seems as it should. Any tips/hints on what causes the change in the database? Thank you.

    Regards,

    -- Mike

  2. drmike
    Member
    Posted 18 years ago #

    Google is your friend :)

    You have a corrupted table or index in your database and at teh very least need to run a REPAIR on it.

    I'd actually get with your host and tell them that you're getting that 127 error. They may be doing something to the database.

  3. mikeatkc
    Member
    Posted 18 years ago #

    I just restored the database from backup (last night) and I have many other backup copies of the database. However, the same error occurs, so it can't be the corruption? (not from all the backup copies of the data)

    How many database(s) does WP utilize? one database for each instance right?

    Keeps getting the below from the main page...

    WordPress database error: [Got error 127 from storage engine]
    SELECT option_value FROM wp_1_options WHERE option_name = 'rewrite_rules' LIMIT 1

    WordPress database error: [Duplicate entry '135-0-rewrite_rules' for key 1]

  4. mikeatkc
    Member
    Posted 18 years ago #

    Seems like a duplicate key issue with the database? But then all the databases are restored from last night (should be good). Any mysql gurus who also uses WP MU?

    Thanks.

    WordPress database error: [Got error 127 from storage engine]
    SELECT option_value FROM wp_1_options WHERE option_name = 'rewrite_rules' LIMIT 1

    WordPress database error: [Duplicate entry 'rewrite_rules' for key 2]
    INSERT INTO wp_1_options

  5. quenting
    Member
    Posted 18 years ago #

    i happen to encounter database corruptions every so often with MU. Not sure if it's MU-related or just mysql5 doing stupid things. I've made a script that loops through all tables to repair/optimize them. Things can get ugly if it's one of the main tables that get corrupted though.

  6. suleiman
    Member
    Posted 18 years ago #

    yikes!

  7. mikeatkc
    Member
    Posted 18 years ago #

    I've solved my database corruption issue. First, I used myisamchk -r to repair the database but then I realized I have backup copies. However, restoring the backup yields the same error. I did a stop/restart on mysqld (/etc/init.d/mysqld stop (wait a few seconds) /etc/init.d/mysqld start) and it solves my problem. Apparently, you need to reload your tables once you repair it or restore the data.

  8. drmike
    Member
    Posted 18 years ago #

    Apparently, you need to reload your tables once you repair it or restore the data.

    Strange as MySQL should be doing that.

    There's an optimize script over at wpmudev.org if you want one.

About this Topic