XF 1.3 What causes the xf_search_index table to crash?

The Grand Potentate

Well-known member
Had this pop up earlier today:

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table './dressedw_forumdb/xf_search_index' is marked as crashed and should be repaired - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Rambo, 2 minutes ago
Stack Trace

#0 /home/dressedw/public_html/forum/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????REPLACE DEL...')
#1 /home/dressedw/public_html/forum/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????REPLACE DEL...')
#2 /home/dressedw/public_html/forum/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????REPLACE DEL...')
#3 /home/dressedw/public_html/forum/library/XenForo/Search/SourceHandler/MySqlFt.php(110): Zend_Db_Adapter_Abstract->query('????REPLACE DEL...')
#4 /home/dressedw/public_html/forum/library/XenForo/Search/SourceHandler/MySqlFt.php(82): XenForo_Search_SourceHandler_MySqlFt->_pushToIndex('('post', 43933,...')
#5 /home/dressedw/public_html/forum/library/XenForo/Search/Indexer.php(44): XenForo_Search_SourceHandler_MySqlFt->insertIntoIndex('post', 43933, '', 'test', 1398013396, 2, 346, Array)
#6 /home/dressedw/public_html/forum/library/XenForo/Search/DataHandler/Post.php(61): XenForo_Search_Indexer->insertIntoIndex('post', 43933, '', 'test', 1398013396, 2, 346, Array)
#7 /home/dressedw/public_html/forum/library/XenForo/Search/DataHandler/Abstract.php(238): XenForo_Search_DataHandler_Post->_insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#8 /home/dressedw/public_html/forum/library/XenForo/DataWriter/DiscussionMessage.php(760): XenForo_Search_DataHandler_Abstract->insertIntoIndex(Object(XenForo_Search_Indexer), Array, Array)
#9 /home/dressedw/public_html/forum/library/XenForo/DataWriter/DiscussionMessage.php(739): XenForo_DataWriter_DiscussionMessage->_insertOrUpdateSearchIndex()
#10 /home/dressedw/public_html/forum/library/XenForo/DataWriter/DiscussionMessage.php(585): XenForo_DataWriter_DiscussionMessage->_indexForSearch()
#11 /home/dressedw/public_html/forum/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_DiscussionMessage->_postSave()
#12 /home/dressedw/public_html/forum/library/XenForo/ControllerPublic/Thread.php(549): XenForo_DataWriter->save()
#13 /home/dressedw/public_html/forum/library/ThreadBan/ControllerPublic/Thread.php(166): XenForo_ControllerPublic_Thread->actionAddReply()
#14 /home/dressedw/public_html/forum/library/XenForo/FrontController.php(347): ThreadBan_ControllerPublic_Thread->actionAddReply()
#15 /home/dressedw/public_html/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#16 /home/dressedw/public_html/forum/index.php(13): XenForo_FrontController->run()
#17 {main}

Request State

array(3) {
  ["url"] => string(77) "http://dressedwell.net/forum/threads/the-football-soccer-thread.346/add-reply"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(9) {
    ["message_html"] => string(15) "<p>test<br></p>"
    ["_xfRelativeResolver"] => string(74) "http://dressedwell.net/forum/threads/the-football-soccer-thread.346/page-7"
    ["attachment_hash"] => string(32) "8f5293156079640eb40fff498f8e289e"
    ["last_date"] => string(10) "1398012914"
    ["last_known_date"] => string(10) "1398012914"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(52) "/forum/threads/the-football-soccer-thread.346/page-7"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"

I repaired it and all seems to be well now. I'm more interested in what caused it to crash in the first place. Thoughts?
 
There's no simple answer, it can be various reasons.

If you do a Google search for "myisam table crash", there are various articles about it.

If it has only happened once and repairing it resolves it, then you don't need to worry about it.
If it's happening regularly/frequently then investigation may be required.
 
There's no simple answer, it can be various reasons.

If you do a Google search for "myisam table crash", there are various articles about it.

If it has only happened once and repairing it resolves it, then you don't need to worry about it.
If it's happening regularly/frequently then investigation may be required.
It's been happening pretty frequently to me since I made the jump from 1.1->1.3, could it be related to the new indexes?
 
No. If you are getting table corruption it's almost certainly down to something with the server itself. If MySQL isn't being stopped/started correctly, that can be the cause. Otherwise, it may be a strong indication of a hardware issue on the server.
 
No. If you are getting table corruption it's almost certainly down to something with the server itself. If MySQL isn't being stopped/started correctly, that can be the cause. Otherwise, it may be a strong indication of a hardware issue on the server.
So, if its a one time thing, chalk it up to a fluke. But if it happens again we should get in contact with our host?
 
No. If you are getting table corruption it's almost certainly down to something with the server itself. If MySQL isn't being stopped/started correctly, that can be the cause. Otherwise, it may be a strong indication of a hardware issue on the server.
Thank you for the clarification, MySQL was crashing (and restarting) because of something silly.
 
Top Bottom