Join the community today
Register Now

MariaDB MySQL errors after using (option 21) Data Transfer

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Pauly, Mar 30, 2025.

  1. Pauly

    Pauly Premium Member Premium Member

    6
    2
    3
    Jan 9, 2019
    Ratings:
    +2
    Local Time:
    9:49 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: Rocky Linux 9
    • Centmin Mod Version Installed: 132.00 stable
    • Nginx Version Installed: 1.27.4
    • PHP Version Installed: 8.3.17
    • MariaDB MySQL Version Installed: 10.6.21
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config:
      Code (Text):
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      SELFSIGNEDSSL_ECDSA='y'
      PHPFINFO='y'
      PHP_OVERWRITECONF='n'
      PYTHON_INSTALL_ALTERNATIVES='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      VHOSTCTRL_CLOUDFLAREINC='y'
      


    @eva2000 pointed me towards option 21 as a possible backup solution so had a look at it today, i ran sub menu option 4 'Backup Nginx Vhosts Data + MariaBackup MySQL Backups'


    When this initiated it installed something Maria related (im not sure what) and since then i have persistent MySQL fetch errors

    The server hosts 3 installs of xenforo, one established forum, one small forum and one empty/development forum
    All three forums are showing persistent errors near identical to the below varying slightly based on what triggered that entry

    Code:
    Server error log
    XF\Db\Exception: MySQL fetch error [2014]: Commands out of sync; you can't run this command now src/XF/Db/AbstractStatement.php:230
    Generated by: Unknown account 29 Mar 2025 at 18:37
    Stack trace
    SELECT `xf_reaction_content`.*, `xf_reaction_Reaction_1`.*, `xf_user_ReactionUser_2`.*, `xf_user_profile_Profile_3`.*, `xf_user_option_Option_4`.*
                FROM `xf_reaction_content`
                INNER JOIN `xf_reaction` AS `xf_reaction_Reaction_1` ON (`xf_reaction_Reaction_1`.`reaction_id` = `xf_reaction_content`.`reaction_id`)
    INNER JOIN `xf_user` AS `xf_user_ReactionUser_2` ON (`xf_user_ReactionUser_2`.`user_id` = `xf_reaction_content`.`reaction_user_id`)
    INNER JOIN `xf_user_profile` AS `xf_user_profile_Profile_3` ON (`xf_user_profile_Profile_3`.`user_id` = `xf_user_ReactionUser_2`.`user_id`)
    INNER JOIN `xf_user_option` AS `xf_user_option_Option_4` ON (`xf_user_option_Option_4`.`user_id` = `xf_user_ReactionUser_2`.`user_id`)
                WHERE (`xf_reaction_content`.`content_type` = 'post' AND `xf_reaction_content`.`content_id` = 560478 AND `xf_reaction_Reaction_1`.`active` = 1)
                ORDER BY `xf_reaction_content`.`reaction_date` DESC
    LIMIT 51
    ------------
    
    #0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL fetch err...', 2014, 'HY000')
    #1 src/XF/Db/Mysqli/Statement.php(142): XF\Db\Mysqli\Statement->getException('MySQL fetch err...', 2014, 'HY000')
    #2 src/XF/Db/AbstractStatement.php(95): XF\Db\Mysqli\Statement->fetchRowValues()
    #3 src/XF/Mvc/Entity/Finder.php(1494): XF\Db\AbstractStatement->fetchAliasGrouped()
    #4 src/XF/Mvc/Entity/Finder.php(1450): XF\Mvc\Entity\Finder->getCollectionFromResults(Object(XF\Db\Mysqli\Statement))
    #5 src/XF/ControllerPlugin/ReactionPlugin.php(191): XF\Mvc\Entity\Finder->fetch()
    #6 src/XF/Pub/Controller/PostController.php(428): XF\ControllerPlugin\ReactionPlugin->actionReactions(Object(XFMG\XF\Entity\Post), 'posts/reactions', Object(XF\Phrase), Array)
    #7 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\PostController->actionReactions(Object(XF\Mvc\ParameterBag))
    #8 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'Reactions', Object(XF\Mvc\RouteMatch), Object(Andy\ShowDeleted\XF\Pub\Controller\Post), NULL)
    #9 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Andy\ShowDeleted\XF\Pub\Controller\Post), NULL)
    #10 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
    #11 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
    #12 src/XF.php(806): XF\App->run()
    #13 index.php(23): XF::runApp('XF\\Pub\\App')
    #14 {main}
    Request state
    array(4) {
      ["url"] => string(23) "/posts/560478/reactions"
      ["referrer"] => bool(false)
      ["_GET"] => array(1) {
        ["/posts/560478/reactions"] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
    I dont know whats caused this or how to trouble shoot it so any input is greatly appreciated
     
  2. Pauly

    Pauly Premium Member Premium Member

    6
    2
    3
    Jan 9, 2019
    Ratings:
    +2
    Local Time:
    9:49 AM
    Well this is very strange, i searched the issue on XF and two of the developers here and here said it was related to mysql which is what led me to post here in the first place

    Anyway i check back to my forums and after seeing hundreds of the above errors over a period of a few hours it has now stopped, no errors over the last couple of hours but i havent done or changed anything so really not sure what happened ???
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,164
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    6:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Probably just coincidental as MariaBackup is a backup tool and shouldn't cause problems unless you tried restoring the backup on same original server which would cause downtime or you ran a backup and drove up disk usage to the point you're borderlining on available disk free space.

    Check disk free space
    Code (Text):
    df -hT


    lets see what YUM packages were installed. I
    Code (Text):
    yum history list

    Your latest yum run would be at top with transaction I'd.

    you can inspect that transaction using below command were XX is the yum transaction id
    Code (Text):
    yum -q history info XX


    This error - “MySQL fetch error [2014]: Commands out of sync; you can't run this command now” - generally indicates that a new query is being initiated on the MySQL connection before the previous query's result set has been fully processed or cleared.

    It means that the connection is still busy with an earlier query (for example, not all rows have been fetched or the result set hasn’t been explicitly freed), and then a subsequent query is executed. This can occur in custom code or addons where result handling isn’t properly managed.

    I suggest reviewing any recent code or addon changes that might affect database interactions. Ensure that every query's result set is completely handled - either by fetching all data or by calling a function to free the result - before issuing another query.

    I see Show Deleted threads by Andy addon in the error. Is this addon installed on all impacted forums?
     
    Last edited: Mar 30, 2025