• Resolved mulli.bahr

    (@mullibahr)


    FINALLY, after MONTHs of searching for ‘Command out of sync.” error generated by Wordfence.
    I can now re-generate it easily. All sw: WP, Wordfence, Elementor & Elementor pro updated Oct 7th, 2021.

    I shall keep a copy of my website for further analysis.

    Immidiate bypass:
    1. Wordfence – Change firewall setting to Learning Mode!
    2. or Diasble Wordfence
    Both are equally bad for me.

    My questions:
    1. Is a “learning period” for Wordfence can fix the issue?
    2. How will I know when this period ends? (trial & error or better?)

    What else can be done

    • This topic was modified 3 years, 1 month ago by mulli.bahr.

    The page I need help with: [log in to see the link]

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

    (@wfpeter)

    Hi @mullibahr, thanks for getting in touch.

    When Learning Mode is activated, anything allowed during your testing in this time should continue to be allowed after you re-set to “Enabled and Protecting”. The learning period is set to 7 days when you initially install the plugin, but after setting it manually we recommend only having it turned on while you click around the trouble (blocked) areas of your site, such as Elementor edit pages, until you have performed all actions – then turn it off again.

    Do you have a copy of the exact full error message you receive? Does the action that causes the error go away when Learning Mode is turned on, then return afterwards?

    Thanks,

    Peter.

    Thread Starter mulli.bahr

    (@mullibahr)

    Hey Peter

    I fail to recreate the problem with Elementor.
    I did clean several issues related to Elementor so maybe I have solved the issue reported.

    However, the “outofsync” still exists!!

    Please find part of my logfile (at the end of this message).
    I cannot relate the error to any specific activity in my site and I log almost all activities.
    Therefore, I suspect error is related to one of WF CRON jobs.

    According to MYSQL doc’s,

    B.3.2.12 Commands out of sync
    If you get Commands out of sync; you can’t run this command now in your client code, you are calling client functions in the wrong order.

    This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.

    Clearly the issue in the log is triggered AFTER some access was not cleared successfuly.
    It may be issues by some other plugin or code – BUT looking the WF code
    I could not find any mysql_free_result() operation.

    Note that I use Litespeed server and confirmed that it run OK on scans etc… If this can help.

    Please advise how to proceed?
    Are there specific CRON actions that might be relevant?

    Thanks
    Mulli

    Part of log – for readability. Dozens of lines removed from original.
    All looks very similar.

    … Commands out of sync; you can’t run this command now query SELECT *,
    WHENtype
    = 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 wpnv_wfblocks7 WHERE type IN (4) AND (expiration = 0 OR expiration > UNIX_TIMESTAMP()) ORDER BY typeSort ASC, id DESC ????? ?? ??? wfWAFIPBlocksController::synchronizeConfigSettings, wfBlock::patternBlocks, wfBlock::allBlo

    • This reply was modified 3 years, 1 month ago by mulli.bahr.
    • This reply was modified 3 years, 1 month ago by mulli.bahr.
    • This reply was modified 3 years, 1 month ago by mulli.bahr.
    • This reply was modified 3 years, 1 month ago by mulli.bahr.
    • This reply was modified 3 years, 1 month ago by mulli.bahr.
    Plugin Support wfpeter

    (@wfpeter)

    Hi @mullibahr,

    The error you last provided is actually familar to another issue we’ve seen crop up quite often but as a general database issue. Even though Wordfence is part of the affected plugins and will show up in these error reports, our latest studies of customer error logs point to the exact same error message also showing across database queries for multiple WordPress plugins. This suggests to us that there is another problem with the database itself stopping, reconnecting and leaving the connection in a state where this error can occur.

    Please also refer to this topic that turned out to be an intermittent load issue at the server end: https://www.ads-software.com/support/topic/commands-out-of-sync-can-we-get-a-resolution-please/

    In general, we recommend:

    • Making sure the MySQL server is up to date.
    • Checking the MySQL error logs to see if there was an error or restart around the times these occur.
    • Checking the access log to see if there is a hit around the time these errors occur.
    • Possibly checking the syslog, to see if there were any unusual errors logged by the OS around the same time.

    Your host may be able to help you with some of these logs and point you in the right direction when considering matching timestamps to see what’s happening in the database at the time of the errors. If you do discover any additional information while looking into the logs that you feel may assist us or other customers, please feel free to let us know here.

    Thanks,

    Peter.

    Thread Starter mulli.bahr

    (@mullibahr)

    Hi @wfpeter

    Just an update – problem seems to be partially gone!
    On one site that I follow carefully – it did not appear for 5+ days
    which clearly shows an iprovement.
    But it does appear on logs of other sites.

    My correction steps:
    1. Fix some Elementor issues: fix warnings locally
    2. Kill some stalled mysql related processes & Restart mysqld on the server.
    3. No change in Wordfence.

    I shall keep you updated.

    Plugin Support wfpeter

    (@wfpeter)

    Thanks @mullibahr for the update.

    I do suspect MySQL is behind the issue and glad there have been some notable improvements since the restarts and alterations you’ve made. Let me know if you find out any further information as the type errors do crop up from time-to-time in WordPress installations that we see and it never hurts to have more detailed information from a customer able to successfully troubleshoot it.

    Thanks,

    Peter.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Command out of sync, Wordfence trigger on Elementor Pro Edit page with a form’ is closed to new replies.