• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Another DB crashed and should be repaired error

#1
Wasn't doing anything on the forums, haven't upgraded anything. Checked and saw this:

Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table './vondroid_xen20/xf_session' is marked as crashed and should be repaired - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Piers, A moment ago
Stack Trace
#0 /home/vondroid/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `xf...')
#1 /home/vondroid/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `xf...')
#2 /home/vondroid/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `xf...')
#3 /home/vondroid/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#4 /home/vondroid/public_html/library/XenForo/Session.php(690): Zend_Db_Adapter_Abstract->insert('xf_session', Array)
#5 /home/vondroid/public_html/library/XenForo/Session.php(431): XenForo_Session->saveSessionToSource('31db4b44c944568...', false)
#6 /home/vondroid/public_html/library/XenForo/Controller.php(403): XenForo_Session->save()
#7 /home/vondroid/public_html/library/XenForo/Controller.php(350): XenForo_Controller->updateSession(Object(XenForo_ControllerResponse_Redirect), 'XenForo_Control...', 'Facebook')
#8 /home/vondroid/public_html/library/XenForo/FrontController.php(317): XenForo_Controller->postDispatch(Object(XenForo_ControllerResponse_Redirect), 'XenForo_Control...', 'Facebook')
#9 /home/vondroid/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/vondroid/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(194) "http://vondroid.com/index.php?regis...rI4sVZA7QPQZDZD&redirect=http://vondroid.com/"
["_GET"] => array(3) {
["register/facebook"] => string(0) ""
["t"] => string(112) "AAAC2ih2zxMEBAF25gZAE7RllJmoYtmpnD9eR4A1woJhUkV9o31oSxMfueJ2TZBBZCSvtPKDWw6RnaUz8AOdaiEv7DjZAl6bFrI4sVZA7QPQZDZD"
["redirect"] => string(20) "http://vondroid.com/"
}
["_POST"] => array(0) {
}
}
I've fixed the DB and it's working but would like to know why it did that.
 

Jeremy P

Well-known member
#3
I'm not a MySQL expert or anything but it's my understanding tables just crash sometimes. I'm sure there is a reason but I think it can vary and simply can't always be prevented. Shouldn't be a big issue unless it's crashing repeatedly, in which case I'd say something is misconfigured.
 

Jake Bunce

XenForo moderator
Staff member
#4
Could be lack of available storage space causing corruption, or a server crash. There are many possibilities. It's only a concern if the corruption is recurring.
 

tenants

Well-known member
#5
That's strange, the same thing happened on my local test MySQL (Windows 8) database, nobody has accesses to this forum apart from me (xf_session):

Mysqli prepare error: Table '.\xenforo\xf_session' is marked as crashed and should be repaired
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  5. Zend_Db_Adapter_Abstract->insert() in XenForo/Session.php at line 690
  6. XenForo_Session->saveSessionToSource() in XenForo/Session.php at line 431
  7. XenForo_Session->save() in XenForo/Controller.php at line 403
  8. XenForo_Controller->updateSession() in XenForo/Controller.php at line 350
  9. XenForo_Controller->postDispatch() in XenForo/FrontController.php at line 317
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  11. XenForo_FrontController->run() in C:/Program Files (x86)/Zend/Apache2/htdocs/xenforo/index.php at line 13
Hmmm.. there's something about the xf_session table. This is not a storage issue (there haven't been enough sessions to cause a storage issue)
 

Luke F

Well-known member
#7
That's strange, the same thing happened on my local test MySQL (Windows 8) database, nobody has accesses to this forum apart from me (xf_session):

Mysqli prepare error: Table '.\xenforo\xf_session' is marked as crashed and should be repaired


Hmmm.. there's something about the xf_session table. This is not a storage issue (there haven't been enough sessions to cause a storage issue)
Probably improper shutdown