Want more timely Centmin Mod News Updates?
Become a Member

Xenforo Constantly getting MySQL error while running defer

Discussion in 'Forum software usage' started by Milano, Oct 21, 2015.

  1. Milano

    Milano New Member

    15
    3
    3
    Oct 1, 2014
    Ratings:
    +3
    Local Time:
    3:53 PM
    I getting MySQL error everytime XF try to perform the defer task. Do you guys have any ideal on this.

    Code:
    Are you sure you want to upgrade? [y/n] y
    Rebuilding / importing data...
    Rebuilding... Templates  .
    An exception occurred: mysqli_stmt::close(): Couldn't fetch mysqli_stmt in Zend/Db/Statement/Mysqli.php on line 105
    #0 [internal function]: XenForo_Application::handlePhpError(2, 'mysqli_stmt::cl...', '/home/nginx/dom...', 105, Array)
    #1 Zend/Db/Statement/Mysqli.php(105): mysqli_stmt->close()
    #2 Zend/Db/Adapter/Mysqli.php(374): Zend_Db_Statement_Mysqli->close()
    #3 Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\t\t\t\tINSERT IN...')
    #4 XenForo/Model/Deferred.php(116): Zend_Db_Adapter_Abstract->query('\r\n\t\t\t\tINSERT IN...', Array)
    #5 XenForo/Application.php(1458): XenForo_Model_Deferred->defer('Atomic', Array, 'installUpgradeR...', 1, 1442941801)
    #6 XenForo/Model/Deferred.php(311): XenForo_Application::defer('Atomic', Array, 'installUpgradeR...', 1, 1442941801, true)
    #7 XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999949932098, 'Rebuilding... T...', false)
    #8 XenForo/Model/Deferred.php(355): XenForo_Model_Deferred->_runInternal(Array, NULL, 'Rebuilding... T...', false)
    #9 XenForo/Install/run-upgrade.php(170): XenForo_Model_Deferred->runByUniqueKey('installUpgradeR...', NULL, 'Rebuilding... T...')
    #10 {main}
    
    Are you sure you want to upgrade? [y/n] y
    Rebuilding / importing data...
    Importing... Phrases  .
    An exception occurred: Mysqli prepare error: MySQL server has gone away in Zend/Db/Statement/Mysqli.php on line 77
    #0 Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\r\n\t\t\t\tINSERT IN...')
    #1 Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\r\n\t\t\t\tINSERT IN...')
    #2 Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\t\t\t\tINSERT IN...')
    #3 XenForo/Model/Deferred.php(139): Zend_Db_Adapter_Abstract->query('\r\n\t\t\t\tINSERT IN...', Array)
    #4 XenForo/Application.php(1458): XenForo_Model_Deferred->defer('Atomic', Array, 'installUpgradeR...', 1, 1442941910)
    #5 XenForo/Model/Deferred.php(311): XenForo_Application::defer('Atomic', Array, 'installUpgradeR...', 1, 1442941910, true)
    #6 XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999349117279, 'Importing... Ph...', false)
    #7 XenForo/Model/Deferred.php(355): XenForo_Model_Deferred->_runInternal(Array, NULL, 'Importing... Ph...', false)
    #8 XenForo/Install/run-upgrade.php(170): XenForo_Model_Deferred->runByUniqueKey('installUpgradeR...', NULL, 'Importing... Ph...')
    #9 {main}
    
    This is the error log from XF upgrade via CLI, same for install/upgrade add-ons

    Current system:
    Digital Ocean 512MB droplet.
    CentOS 6.5
    PHP 5.6.12
    nginx 1.9.4
    MariaDB 10.0.21
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,946
    6,572
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,753
    Local Time:
    6:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    post contents of /etc/my.cnf and size of your database and xf forum
     
  3. Milano

    Milano New Member

    15
    3
    3
    Oct 1, 2014
    Ratings:
    +3
    Local Time:
    3:53 PM
    Code:
    #
    # This group is read both both by the client and the server
    # use it for options that affect everything
    #
    [client-server]
    
    #
    # include all files from the config directory
    #
    !includedir /etc/my.cnf.d
    
    [mysqld]
    character-set-server=utf8
    
    [mariadb-10.0]
    # 2 variables needed to switch from XtraDB to InnoDB plugins
    #plugin-load=ha_innodb
    #ignore_builtin_innodb
    
    ## MariaDB 10 InnoDB plugin only
    #innodb_buffer_pool_load_now=1
    #innodb_buffer_pool_dump_now=1
    ## Disabled settings
    performance_schema=OFF
    innodb_stats_on_metadata=OFF
    innodb_sort_buffer_size=2M
    innodb_online_alter_log_max_size=128M
    query_cache_strip_comments=0
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
    
    my.cnf

    The DB size is 97.8MB with ~ 132k total records.
    My XF forum has 9 add-ons and 1 style
     
  4. eva2000

    eva2000 Administrator Staff Member

    28,946
    6,572
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,753
    Local Time:
    6:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  5. Milano

    Milano New Member

    15
    3
    3
    Oct 1, 2014
    Ratings:
    +3
    Local Time:
    3:53 PM
  6. eva2000

    eva2000 Administrator Staff Member

    28,946
    6,572
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,753
    Local Time:
    6:53 PM
    Nginx 1.13.x
    MariaDB 5.5
  7. Milano

    Milano New Member

    15
    3
    3
    Oct 1, 2014
    Ratings:
    +3
    Local Time:
    3:53 PM
  8. eva2000

    eva2000 Administrator Staff Member

    28,946
    6,572
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,753
    Local Time:
    6:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    it's minimal template for 512mb vps sizes or <2GB
     
    • Like Like x 1
  9. Milano

    Milano New Member

    15
    3
    3
    Oct 1, 2014
    Ratings:
    +3
    Local Time:
    3:53 PM
    Done. I'll try to ugrade XF to 1.5.2 now.
     
  10. Milano

    Milano New Member

    15
    3
    3
    Oct 1, 2014
    Ratings:
    +3
    Local Time:
    3:53 PM
    Successfully upgrade to 1.5.2 without error. Thanks
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    28,946
    6,572
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,753
    Local Time:
    6:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    glad to hear :)