Title: error_log with WordFence errors
Last modified: October 17, 2022

---

# error_log with WordFence errors

 *  [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/)
 * Hello,
 * I keep seeing the following error on Multiple websites in an error_log file in
   the root of the WP installation.
 *     ```
       [14-Oct-2022 15:48:30 UTC] WordPress databasefout Commands out of sync; you can't run this command now bij 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 gemaakt door wfShutdownRegistry->handleShutdown, wfShutdownFunction->invoke, wfWAFIPBlocksController::synchronizeConfigSettings, wfBlock::lockouts, wfBlock::allBlocks
       ```
   
 * Thanks for looking into this.
    -  This topic was modified 3 years, 7 months ago by [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16109658)
 * Hi [@jpnl](https://wordpress.org/support/users/jpnl/), thanks for your detailed
   message.
 * We have seen this on various sites in the past, but almost always Litespeed if
   you’re running on that environment.
 * That said, Litespeed runs fine for plenty of sites also running Wordfence so 
   your host will need to troubleshoot why this is happening. 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.
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16113366)
 * Ok, I will look into it and get back, thanks.
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16132695)
 * Thanks [@jpnl](https://wordpress.org/support/users/jpnl/), let us know if you
   discover anything new!
 * Peter.
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16150311)
 * Hi [@wfpeter](https://wordpress.org/support/users/wfpeter/),
 * I did some investigation and I can confirm that the error only happens on websites
   that are hosted on a LiteSpeed server. From the websites that run on the LiteSpeed
   server, there are only 7 out of 20 websites that get this error on a regular 
   bases. The others don’t have this error. All these websites are on the same server
   in a WHM reseller account and each site has it’s own cPanel account. I don’t 
   see any pattern between the sites with/without the error. That seems like it 
   is not server related.
 * The most recent error was today and there was no error in the server log around
   the same time. There were also no issues with resource usages.
 * Do you gave any other idea what can be checked?
 * Thanks
    JP
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16152363)
 * Also, hosting party says:
 * > In LiteSpeed or MariaDB logs, we see no issues that would lead to website limitations.
 * And also
 * > The error messages that do occur are mainly about the Wordfence plugin, which
   > is also not recommended for use on our servers. The reason for this is that
   > we already provide additional software at server level for website security,
   > including Imunify360, which we use in addition to monitoring.
 * What’s your take on both statements?
 * Thanks
    JP
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16168306)
 * I checked 31 sites today who are in the same whm account on the same litespeed
   server. 6 of them repeatedly have this error and the 31 sites are more or less
   identical in theme and plugins configuration.
 * Since it doesn’t happen on all sites, it’s hard to believe it’s caused by a wrong
   database/litespeed configuration.
 * What is the wp_wfBlocks7 table for? I checked and it’s empty.
 * Shouldn’t there be some sort of error handling to get around this and not write
   a errors_log file?
 * Thanks
    JP
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16201002)
 * Hi [@jpnl](https://wordpress.org/support/users/jpnl/), thanks for looking into
   this.
 * The `wp_wfBlocks7` table stores currently blocked IPs on your site. Having 0 
   rows just mean blocks have expired and removed. If there is data in any of the
   sites you’ve been testing, you could try exporting data from wp_wfblocks7 to 
   confirm there are no copies of post data somehow in that table, but we expect
   the issue you’re seeing is a problem when the query is being processed. Some 
   queries we do are designed to fail silently, but will still produce some log 
   information in the background.
 * Just in case there is something wrong in wp_wfblocks7, you could also try repairing
   it. It’s less likely that an issue like that could affect 6 websites but not 
   impossible if they’re using similar configurations and something common across
   all sites is affecting the table.
 * Some hosts may have professional associations or preferences when it comes to
   security plugins on WordPress, but we understand that many individuals installing
   Wordfence or another security plugin just want to be able to choose their preferred
   one too. We usually work with hosts to keep a good relationship and troubleshoot
   any cases where a host is having particular problems with Wordfence.
 * For this reason, you could drop us a diagnostics report so we can try looking
   a bit more closely at your configuration to **wftest @ wordfence . com**. You
   can find the link to do so at the top of the **Wordfence > Tools > Diagnostics**
   page. Then click on **“Send Report by Email”**. Please add your forum username
   where indicated and _respond here after you have sent it._
 * **NOTE:** It should look as follows – Screenshot of [Tools > Diagnostic > Send by Email](https://www.wordfence.com/wp-content/uploads/2021/09/diagnosticsendbyemail.png)
 * Thanks again,
 * Peter.
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16212225)
 * Thanks for explaining [@wfpeter](https://wordpress.org/support/users/wfpeter/)
 * I checked the sites in question again (it’s 2 weeks later). From the sites I 
   checked before:
    – 4 who had the error before have it again – 2 who had the error
   before doesn’t have it now – 2 who didn’t have it before do have it now
 * Did repair these databases now and will see again how that goes.
 * I have also sent the diagnostic report.
 * Thanks
    JP
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16289537)
 * Any news on this?
 * See also [this ticket](https://wordpress.org/support/topic/malformed-cookie-redaction-patterns-received/)
   with more errors coming from Wordfence.
 * Thanks
    JP
 *  Thread Starter [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * (@jpnl)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16581635)
 * This is still an issue!
   When will there be a fix?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘error_log with WordFence errors’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [John-Pierre Cornelissen](https://wordpress.org/support/users/jpnl/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/error_log-with-wordfence-errors/#post-16581635)
 * Status: not resolved