XF 1.5 Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Disk full

Divvens

Well-known member
The following error popped in multiple times during a span of 10 minutes, and then stopped. I'm on a managed server, do I need to get my host to do anything specific?

PHP:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Disk full (/tmp/#sql_48eb_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Zemmi, 11 minutes ago
Stack Trace
#0 /home/xxxxxx/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/xxxxxx/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/xxxxxx/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT\n\t\t\t\t...', 3418, 2)
#3 /home/xxxxxx/public_html/library/XenForo/Model/User.php(1936): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT\n\t\t\t\t...', 'user_id', 3418)
#4 /home/xxxxxx/public_html/library/XenForo/ControllerPublic/Member.php(343): XenForo_Model_User->getFollowedUserProfiles(3418, 6, 'RAND()')
#5 /home/xxxxxx/public_html/library/Waindigo/Trophies/Extend/XenForo/ControllerPublic/Member.php(67): XenForo_ControllerPublic_Member->actionMember()
#6 /home/xxxxxx/public_html/library/bdCache/XenForo/ControllerPublic/Member.php(16): Waindigo_Trophies_Extend_XenForo_ControllerPublic_Member->actionMember()
#7 /home/xxxxxx/public_html/library/bdMedal/Extend/ControllerPublic/Member.php(7): bdCache_XenForo_ControllerPublic_Member->actionMember()
#8 /home/xxxxxx/public_html/library/XenForo/FrontController.php(351): bdMedal_Extend_ControllerPublic_Member->actionMember()
#9 /home/xxxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/xxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(46) "http://orojackson.com/members/hero-sanji.3418/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

6M5ybOe.webp
 
Followed up by the below error;
PHP:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Crazy jack, 1 minute ago
Stack Trace
#0 /home/aa/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/aa/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/aa/public_html/library/Zend/Db/Adapter/Abstract.php(632): Zend_Db_Adapter_Abstract->query('UPDATE `xf_user...', Array)
#3 /home/aa/public_html/library/XenForo/Model/Alert.php(365): Zend_Db_Adapter_Abstract->update('xf_user', Array, 'user_id = 11160')
#4 /home/aa/public_html/library/XenForo/Model/Alert.php(352): XenForo_Model_Alert->resetUnreadAlertsCounter(11160)
#5 /home/aa/public_html/library/XenForo/ControllerPublic/Account.php(79): XenForo_Model_Alert->markAllAlertsReadForUser(11160)
#6 /home/aa/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Account->actionAlertsPopup()
#7 /home/aa/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/aa/public_html/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(209) "http://orojackson.com/account/alerts-popup?&_xfRequestUri=%2Fthreads%2Fkaido-is-not-immortal.25898%2F&_xfNoRedirect=1&_xfToken=11160%2C1462128963%2Ccf0ba24b68d18bce99afe7e15d9b044fa6f26bb6&_xfResponseType=json"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(37) "/threads/kaido-is-not-immortal.25898/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(57) "11160,1462128963,cf0ba24b68d18bce99afe7e15d9b044fa6f26bb6"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 
The initial error is fairly clear - it's due to a full disk.

Contact your host and ask them to rotate the logs or find some other way of freeing up some space.
 
The initial error is fairly clear - it's due to a full disk.

Contact your host and ask them to rotate the logs or find some other way of freeing up some space.
Yep, they confirmed it was an R1 soft error which caused the issues, it's sorted out now.

But the other errors popped up even after the disk space error, specifically;

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Deadlock found when trying to get lock; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214

Can these be related or did something happen to the Mysqli service to make it pop up these errors?
 
Alright, it's being sorted out I think.

Host is restarting and performing a check & repair on the database.

If these errors still persist, I'll submit a ticket as it's taken my site offline due to being unusable.
 
t looks like the table xf_search was damaged - it was likely being written when the space ran out.

Can you see if XenForo can advise you on rebuilding it or give me the SQL I need to at least recreate the table empty for you.

This can be rebuilt via the ACP right? So if the host recreates the empty table I can recreate the search index via ACP?

@Brogan (sorry for the tag!)
 
I should be able to drop and recreate the table via the following query, right?
Code:
$tables['xf_search'] = "
    CREATE TABLE xf_search (
        search_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
        search_results MEDIUMBLOB NOT NULL,
        result_count SMALLINT UNSIGNED NOT NULL,
        search_type VARCHAR(25) NOT NULL,
        search_query VARCHAR(200) NOT NULL,
        search_constraints MEDIUMBLOB NOT NULL,
        search_order VARCHAR(50) NOT NULL,
        search_grouping TINYINT NOT NULL DEFAULT 0,
        user_results MEDIUMBLOB NOT NULL,
        warnings MEDIUMBLOB NOT NULL,
        user_id INT UNSIGNED NOT NULL,
        search_date INT UNSIGNED NOT NULL,
        query_hash varchar(32) NOT NULL DEFAULT '',
        PRIMARY KEY (search_id),
        KEY search_date (search_date),
        KEY query_hash (query_hash)
    ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
";

And I can after that rebuild the search index via ACP?

Would that be the best route to go ahead? Or is there any other better way to go tackle with this situation?

Sorry for the multiple posts, just freaking out a bit :p

EDIT:
xf_search_index query
Code:
// note: leaving this content_type as varchar to avoid an alter in upgrades
$tables['xf_search_index'] = "
    CREATE TABLE xf_search_index (
        content_type VARCHAR(25) NOT NULL,
        content_id INT UNSIGNED NOT NULL,
        title VARCHAR(250) NOT NULL DEFAULT '',
        message MEDIUMTEXT NOT NULL,
        metadata MEDIUMTEXT NOT NULL,
        user_id INT UNSIGNED NOT NULL DEFAULT 0,
        item_date INT UNSIGNED NOT NULL,
        discussion_id INT UNSIGNED NOT NULL DEFAULT 0,
        PRIMARY KEY (content_type, content_id),
        FULLTEXT KEY title_message_metadata (title, message, metadata),
        FULLTEXT KEY title_metadata (title, metadata),
        KEY user_id_item_date (user_id, item_date)
    ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
";
 
Last edited:
Top Bottom