Support » Plugin: Wordfence Security - Firewall & Malware Scan » Database error wfBlocks7

  • Resolved lencw

    (@lencw)


    See on other websites, not sure how it was resolved. Now only on one website.
    The table exists. Its happening at all times of the day.
    I cannot find any reliable solution from other posts.
    Is there a known cause for this, and a way to work out whats triggering it? Then a way to resolve it?

    [26-Jan-2022 00:12:10 UTC] 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>jwl_wfBlocks7</code> WHERE <code>type</code> IN (1, 8, 9, 2, 5, 6) 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::ipBlocks, wfBlock::allBlocks
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter lencw

    (@lencw)

    Should have said:
    Wordpress 5.8.3
    GeneratePress theme: 3.1.0
    Wordfence: 7.5.7

    Plugin Support wfpeter

    (@wfpeter)

    Hi @lencw, thanks for getting in touch with the detailed report.

    As you may have seen from other posts, we have seen one case resolved as it was an issue with the customer’s load balancer, but have never received enough logging information to confirm the same cause in other occurrences.

    We are sure that MySQL/MariaDB is stopping, reconnecting and leaving the connection in a state that somehow causes this query error to appear. When sent error logs, we also see the exact same entries but with other plugin tables sometimes being the cause so believe it’s likely that there’s a database problem causing this behavior.

    If you haven’t exported data from jwl_wfblocks7 to confirm there are no copies of post data somehow in that table, you could, but we think it’s a problem when the query is being processed. You could also try repairing the table.

    Finally, you and/or your host need to check the database server logs, 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 to see a problem where the database is unavailable temporarily either because it is restarting or has crashed.

    Let me know what you find out!

    Peter.

    Thread Starter lencw

    (@lencw)

    Peter, thanks.
    The table didn’t need repairing, also got hosting company (who are very good) to check logs, thats currently in progress.
    LenW

    Plugin Support wfpeter

    (@wfpeter)

    Thanks for the extra information @lencw, let me know how that goes and hopefully can shed some light on what’s causing the database to stop. Tickets are typically left open on the forums for 7 days with no responses, so we’ll leave this open in case any further information comes up in that time.

    Peter.

    Thread Starter lencw

    (@lencw)

    In the MySQL server logs we are seeing:
    “Got an error reading communication packets” at the same time as the errors in the wordpress error_log.
    The wordfence table error coincides with a database error which has a reference to the Divi builder (standalone version, not the theme).
    It happens on the live server, but not on a server with a copy of the website. Currently checking MySQL settings. We suspect it might be max_allowed_packet, connect_timeout, interactive_timeout, and wait_timeout settings.
    However, we are unable to identify whats happening at the time of the recorded errors: front end user or admin user, its not creating an order as times don’t correlate.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @lencw,

    Did you find any further information about what was happening at the exact time the error was thrown? It looks like you’ve gone quite a bit further into this than we’ve managed to get information on before and it does go some way to explaining a database communication issue as we had expected.

    Thanks again,

    Peter.

    Thread Starter lencw

    (@lencw)

    At the same time as wfblocks erros the there are 2 other database out of sync errors relating to:

    WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM jwl_options WHERE option_name = ‘_transient_timeout_et_builder_ajax_cache’
    WordPress database error Commands out of sync; you can’t run this command now for query SELECT option_value FROM jwl_options WHERE option_name = ‘_transient_et_builder_ajax_cache’

    However Elegantthemes suggest disabling plugins etc, but this is on a busy live site.
    I have a copy on a different server, and there are no errors.
    Currently checking server config differences live to copy server.

    We still cannot identify whats happening at the point of the errors. If divi builder related, it could be an admin task, but we doubt it due to the time and limited admin access.

    Thread Starter lencw

    (@lencw)

    Its not resolved!
    We have now upgraded this website to Wordfence Premium.
    What does the jwl_wfblocks7 table do, what happens if we delete all records, can ew do that? What will we lose?
    Thanks

    Hi @lencw !
    Did you manage to solve this problem?
    Did upgrade the wordfense plugin help?
    Best regards, Vadym.

    Thread Starter lencw

    (@lencw)

    No, these errors are still there.
    Software up to date, server checked, php 7.4.
    Other plugins looked at, nothing appears to change.
    Still sort of random, in that when these errors appear cannot relate to any specific activity. This is a site with lots of regular traffic.
    LenW

    Continues here too, though as many as 7 or 8 days can pass between instances sometimes (though there is no set interval, and they can happen frequently).

    For us, it began about a month ago soon after installing Super Page Cache for Cloudflare plugin, which may or may not be coincidental. Due to how complicated it is to configure, I don’t really want to uninstall it to find out.

    These errors are beyond cool, but in case we’d rather not have them anymore, any realistic solution on the horizon?

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.