XF 1.2 Mysqli prepare error: Table './xf_forums/xf_session' is marked as crashed and should be repaired

Zantetsuken

Member
Help! We've just started getting this error on the site which is preventing the entire forum from working. Any help appreciated.


Code:
Mysqli prepare error: Table './xf_forums/xf_session' is marked as crashed and should be repaired

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in XenForo/Session.php at line 760
XenForo_Session->saveSessionToSource() in XenForo/Session.php at line 501
XenForo_Session->save() in XenForo/Controller.php at line 412
XenForo_Controller->updateSession() in XenForo/Controller.php at line 356
XenForo_Controller->postDispatch() in XenForo/FrontController.php at line 344
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/vhosts/precursorgames.com/httpdocs/forums/index.php at line 13
 
Did they say what's eating all of the memory?

Just because the connections are set to 2.000, that doesn't mean they will all be used.
 
I'm just assuming that it's usage on my server, but maybe that's an incorrect assumption based on years of my hosts saying the problems are always due to site usage.

I have 5 XF forums running on the server that are only doing about 450,000 pageviews per month. Shouldn't a 2GB linode handle that just fine?

If I run "ps -auxh --sort=size | tac" I see that mysqld is using about 26.5% of memory, then "nscd" then the rest are just tiny 0.x% processes like httpd or pop3.

upload_2016-4-6_15-25-34.webp

ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 20
upload_2016-4-6_15-28-25.webp
 
As an example, if you suddenly get a lot of Apache connections (as might happen with a DoS) and you have a reasonably high MaxClients limit, a lot of memory could be used (as each connection would be taking up ~0.4%, so 200 connections would be ~80%, which would exhaust memory).

Not saying it definitively is that, but just giving an example where you can "burst" to use a lot of memory that isn't happening during normal operations.
 
Top Bottom