Search index table has crashed. Not able to post.

-GR-

Well-known member
I had a member email me this morning saying that he wasn't able to post. He is one that tends to have trouble with some things so I went on to check and sure enough it is doing it to me too.

When you type your message in the quick reply and click reply nothing happens except for a clear message box with the x to close it.

I checked the admincp and there are 10 of these errors:
Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table './opt_opt/xf_search_index' is marked as crashed and should be repaired - library/Zend/Db/Statement/Mysqli.php:77
Generated By: -GR-, 5 minutes ago
Stack Trace
#0 /home/opt/public_html/forum/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????REPLACE DEL...')
#1 /home/opt/public_html/forum/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????REPLACE DEL...')
#2 /home/opt/public_html/forum/library/Zend/Db/Adapter/Abstract.php(467): Zend_Db_Adapter_Mysqli->prepare('????REPLACE DEL...')
#3 /home/opt/public_html/forum/library/XenForo/Search/SourceHandler/MySqlFt.php(62): Zend_Db_Adapter_Abstract->query('????REPLACE DEL...', Array)
#4 /home/opt/public_html/forum/library/XenForo/Search/Indexer.php(44): XenForo_Search_SourceHandler_MySqlFt->insertIntoIndex('post', '2119', '', 'testing', 1291721211, 2, 107, Array)
#5 /home/opt/public_html/forum/library/XenForo/Search/DataHandler/Post.php(47): XenForo_Search_Indexer->insertIntoIndex('post', '2119', '', 'testing', 1291721211, 2, 107, Array)
#6 /home/opt/public_html/forum/library/XenForo/Search/DataHandler/Abstract.php(227): XenForo_Search_DataHandler_Post->_insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#7 /home/opt/public_html/forum/library/XenForo/DataWriter/DiscussionMessage.php(660): XenForo_Search_DataHandler_Abstract->insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#8 /home/opt/public_html/forum/library/XenForo/DataWriter/DiscussionMessage.php(639): XenForo_DataWriter_DiscussionMessage->_insertOrUpdateSearchIndex()
#9 /home/opt/public_html/forum/library/XenForo/DataWriter/DiscussionMessage.php(495): XenForo_DataWriter_DiscussionMessage->_indexForSearch()
#10 /home/opt/public_html/forum/library/XenForo/DataWriter.php(1295): XenForo_DataWriter_DiscussionMessage->_postSave()
#11 /home/opt/public_html/forum/library/XenForo/ControllerPublic/Thread.php(489): XenForo_DataWriter->save()
#12 /home/opt/public_html/forum/library/XenForo/FrontController.php(303): XenForo_ControllerPublic_Thread->actionAddReply()
#13 /home/opt/public_html/forum/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#14 /home/opt/public_html/forum/index.php(15): XenForo_FrontController->run()
#15 {main}
Request State
array(3) {
  ["url"] => string(72) "http://domain.com/forum/threads/spam-test-post-4.107/add-reply"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(7) {
    ["message_html"] => string(33) "<p>testing<br _mce_bogus="1"></p>"
    ["_xfRelativeResolver"] => string(63) "http://domain.com/forum/threads/spam-test-post-4.107/"
    ["attachment_hash"] => string(32) "9bfc33ec001f838d5d69a29e0d794b63"
    ["last_date"] => string(10) "1289477136"
    ["_xfToken"] => string(53) "2,1291721204,653444e63bd2cc241a82ea147a78e78c605ac416"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}


Anyone have any recommendations on the best way to repair the table is? Also maybe why this error would have happened? I have no mods on the site other then the wordpress bridge and I don't think that would affect it.
 
Do you have access to cPanel?
You can click on MySQL Databases and there is an option to repair the table.

Ensure you take a backup first just in case.
 
I got the table repaired and can post on the forum again but I would like to figure out why the table got corrupted in the first place. Could it just have been a fluke?

I did have a too many connections error on Nov 8th but other then that I haven't had any trouble.
 
A table crash is usually related to server issues at the time the table is being written to.

Are you on a shared server, VPS?
 
I am on VPS.

Last night I did the switch to the tables on my main site which is currently on vb4 to InnoDB tables and I also adjusted the my.cnf to allow min 3 letter searches rather then the default of 4 due to some complaints of not being able to search for terms like 800. So with that change I restarted mysql so maybe that might have been the cause? I am pretty sure though that there were some posts made on the xf site last night after I had restarted mysql. I will keep an eye on it. Hopefully I don't run in to any other problems.

The XF site was just submitted to the search engines, I figured I might as well get it submitted since it will be a month or two till it really gets indexed. I would really like to get my main site switched to XF but there are a lot of variables and mods that need to come in to play first before I can make that switch.
 
I also adjusted the my.cnf to allow min 3 letter searches rather then the default of 4 due to some complaints of not being able to search for terms like 800.
This would've helped in the beginning - this is exactly what caused it. The MySQL docs state that all of your full-text indexes need to be rebuilt after a change to the minimum word length, or you get this situation. :)
 
This would've helped in the beginning - this is exactly what caused it. The MySQL docs state that all of your full-text indexes need to be rebuilt after a change to the minimum word length, or you get this situation. :)

Thank you for the confirmation Mike. I didn't even think about rebuilding the indexes other then the vb index not thinking it was going to affect the other sites. I have some reindexing to do :D
 
Top Bottom