• Resolved Maggie96

    (@maggie96)


    Hello,


    I am getting this error in a fresh installation of Wordfence on a new website (wordpress version 6.2) with only one other plugin so far: Seedprod website builder. Just a one page site. I don't know what this error from Wordfence means. Can you help me understand what is wrong and how to correct it?

    Wordfence database error commands out of sync; you can't run this command now for query select*,
    "When type = 3 then 0
    "When type = 4 then 1
    "When type = 7 then 2
    "When type = 6 then 3
    "When type = 5 then 4
    "When type = 9 then 5
    "When type = 8 then 6
    "When type = 2 then 7
    "When type = 1 then 8
    Else 9999
    End as typesort CASE
    "When type = '3 then parameters'
    "When type = '4 then parameters'
    "When type = 1 then IP
    "When type = 9 then IP
    "When type = 5 then IP
    "When type = 6 then IP
    "When type = 7 then IP
    "When type = 2 then IP
    "When type = 8 then IP
    ELSE 9999
    END as 'detail sort'
    From 'wp3c_wfblock7' where 'type' IN (4) AND ('expiration' = 0 OR 'expiration'> UNIX_TIMESTAMP()) ORDER BY 'typesort' ASC, 'id' DESC made ny wfshutdownregistry->handle shutdown, wfshutdownfunction->invoke, wfWAFIPBlocksController::synchronizeCongifgSettings, wfBlock::patternBlocks, wfAllBlocks

    And it just keeps repeating this.

    Thank you, Maggie

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @maggie96, thanks for reaching out to us,

    When you see a “Commands out of sync” database error in your logs there are often other plugins getting the same error as well. The issue happens because some plugins, including Wordfence, use PHP’s “shutdown handler” to run some code after the rest of a database request has finished. If the database connection is lost during a request, this shutdown code still runs and reconnects to the database, which isn’t in a state where queries can be run. Such states include the database being unavailable due to shutting down, or a query limitation set by the hosting provider is reached.

    The “Commands out of sync” errors are not the actual cause of a problem, but rather side-effects of the database getting disconnected. When this error is logged, it’s because something else already failed, but it isn’t visible in PHP’s error log.

    If you have WP-CLI you can run a query like:

    wp db query ‘\s’

    …which should show you the database server’s uptime. The same can be done on the MySQL command line by just typing \s. In a couple of cases reported to us where users had the access to do this, they did find that the database server had recently restarted when they saw these errors. Generally, your hosting provider will need to look into the problem with the database. If they are willing to send us logs, including mysql/mariadb logs and the syslog, we may be able to help determine the cause.

    Thanks,
    Peter.

    Thread Starter Maggie96

    (@maggie96)

    Hi Peter,

    Thank you for the explanation and response.
    I will check with the hosting provider to see if they will help.

    Maggie

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error in wp-admin error log’ is closed to new replies.