• Resolved greencode

    (@greencode)


    Hi. I’m getting loads of these same messages appear in the site error logs.

    Any ideas? Thanks.

    [20-Feb-2023 15:22:47 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT *, CASE 
    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 detailSort
     FROM PPy6gg_wfBlocks7 WHERE type IN (7) AND (expiration = 0 OR expiration > UNIX_TIMESTAMP()) ORDER BY typeSort ASC, id DESC made by wfShutdownRegistry->handleShutdown, wfShutdownFunction->invoke, wfWAFIPBlocksController::synchronizeConfigSettings, wfBlock::lockouts, wfBlock::allBlocks
Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @greencode, thank-you for your detailed message highlighting the issue.

    This has cropped up before, almost exclusively on sites running Litespeed, and does seem related to the database being unavailable at certain times that Wordfence (and other plugins) are trying to use it.

    I must point out that the exact same error appears with other plugins too when seeing error logs we’ve been sent from other sites. That said, Litespeed also runs fine for many customers, so your host might be able to troubleshoot why this is happening too. We believe that the issue is related to the database itself where MySQL/MariaDB is stopping, reconnecting and leaving the connection in a state that somehow causes this query error to appear.

    We usually request that you or your host check the database server logs and other logs for the website(s) on the server such as syslog etc. to see what else is going on with the server at the timestamp of these issues. I would expect the database to be unavailable temporarily, either because it is restarting or has crashed.

    Thanks,
    Peter.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress database error Commands out of sync’ is closed to new replies.