• Resolved MichaelPaulmeno

    (@michaelpaulmeno)


    For a while now we’ve been seeing errors such as these, which occasionally render our website inaccessible:

    WordPress database error Commands out of sync; you can't run this command now for query SELECT *, CASE 
    WHEN <code>type</code> = 3 THEN 0
    WHEN <code>type</code> = 4 THEN 1
    WHEN <code>type</code> = 7 THEN 2
    WHEN <code>type</code> = 6 THEN 3
    WHEN <code>type</code> = 5 THEN 4
    WHEN <code>type</code> = 9 THEN 5
    WHEN <code>type</code> = 8 THEN 6
    WHEN <code>type</code> = 2 THEN 7
    WHEN <code>type</code> = 1 THEN 8
    ELSE 9999
    END AS <code>typeSort</code>, CASE 
    WHEN <code>type</code> = 3 THEN <code>parameters</code>
    WHEN <code>type</code> = 4 THEN <code>parameters</code>
    WHEN <code>type</code> = 1 THEN <code>IP</code>
    WHEN <code>type</code> = 9 THEN <code>IP</code>
    WHEN <code>type</code> = 5 THEN <code>IP</code>
    WHEN <code>type</code> = 6 THEN <code>IP</code>
    WHEN <code>type</code> = 7 THEN <code>IP</code>
    WHEN <code>type</code> = 2 THEN <code>IP</code>
    WHEN <code>type</code> = 8 THEN <code>IP</code>
    ELSE 9999
    END AS <code>detailSort</code>
     FROM <code>wp_wfblocks7</code> WHERE <code>type</code> IN (7) AND (<code>expiration</code> = 0 OR <code>expiration</code> > UNIX_TIMESTAMP()) ORDER BY <code>typeSort</code> ASC, <code>id</code> DESC made by wfWAFIPBlocksController::synchronizeConfigSettings, wfBlock::lockouts, wfBlock::allBlocks

    I’m aware this is a known issue, but have not found any resolution from reading this forum. We’re on a shared hosting plan and our provider has so far been unable to find anything of note (I’ve asked them to check again). I’ve deactivated all, but three of our plugins however this has not helped. Is there anything else we should be looking at?

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

    (@wfpeter)

    Hi @michaelpaulmeno, thanks for getting in touch.

    As you may have seen from the other topics you mention, this error is not exclusive to Wordfence and in all error logs we’ve been sent also occurs with other plugins at various times in those logs. It points to a database communication issue at the time the error is thrown which may be due to the database itself being unavailable during a crash or restart.

    The most recent other case has been looked into extensively by the topic author but an exact cause isn’t yet identified. There is a lot of useful information there though that may assist you in troubleshooting this with your hosting provider/administrator: https://www.ads-software.com/support/topic/database-error-wfblocks7/

    Let us know how you get on!

    Peter.

    Thread Starter MichaelPaulmeno

    (@michaelpaulmeno)

    I opened a ticket with our hosting company on Friday to have them look at those logs and will report back what they find. In the past they haven’t found much, but it’s not clear they searched all the logs mentioned in the other post. Would it help to send you our logs?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @michaelpaulmeno,

    We would recommend as other plugins suffer from the same errors to see what your hosting support says first as they may be able to investigate at a higher level than we would be able to as they’ll have access to your site/database directly. However, the more we can learn from customer logs the better so let me know how you get on and we could arrange those to be sent later on.

    Thanks,

    Peter.

    Thread Starter MichaelPaulmeno

    (@michaelpaulmeno)

    Our hosting provider said they couldn’t find anything out of the ordinary. They did send us the Litespeed and MySQL logs. I’m not an expert with either, but saw a bunch of messages like these around when we had trouble:

    Litespeed:

    /var/log/apache2/error_log:2022-02-07 02:24:08.409493 [INFO] [22056] [xxx.xxx.xxx.xxx:57760-1#APVH_lib.skidmore.edu:lsapi] Abort request processing by PID:20622, kill: 1, begin time: 0, sent time: 0, req processed: 0
    /var/log/apache2/error_log:2022-02-07 04:17:14.611139 [INFO] [24620] [xxx.xxx.xxx.xxx:60971-1#APVH_lib.skidmore.edu:lsapi] Abort request processing by PID:9318, kill: 1, begin time: 1, sent time: 1, req processed: 0
    /var/log/apache2/error_log:2022-02-07 04:17:49.026266 [INFO] [24620] [xxx.xxx.xxx.xxx:60971-1#APVH_lib.skidmore.edu:lsapi] Abort request processing by PID:9763, kill: 1, begin time: 0, sent time: 0, req processed: 0
    /var/log/apache2/error_log:2022-02-07 04:25:56.115219 [INFO] [24623] [xxx.xxx.xxx.xxx:38974-1#APVH_lib.skidmore.edu:lsapi] Abort request processing by PID:17784, kill: 1, begin time: 1, sent time: 1, req processed: 0

    MySQL:

    2022-02-03T15:11:23.005493Z 48190 [Note] Aborted connection 48190 to db: '<name redacted>' user: '<name redacted>' host: 'localhost' (Got an error reading communication packets)

    Thread Starter MichaelPaulmeno

    (@michaelpaulmeno)

    Just to give an update it looks like our WordPress site may be too big for our shared hosting plan. According to the company our website is hitting the limit of the resources they allocate shared hosting accounts, which they say is probably causing some of the errors we’re seeing.

    Plugin Support wfpeter

    (@wfpeter)

    Thanks for the update @michaelpaulmeno, which I always appreciate. It would certainly make sense for the database to encounter issues if resources are stretched on the hosting plan.

    Hopefully you’ll be able to come to a suitable solution with them that allocates the resources your site needs.

    Peter.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress Database Error Commands Out of Sync’ is closed to new replies.