• Resolved ianro

    (@ianro)


    A few days after updating the wordfence plugin, my site became unavailable because Wordfence was making too many calls to the database. My host support person explained below:

    “There was a 503 error caused by the fact that the account went over the allowed limits. To be more exact the CPU and Physical memory limits. You can verify that from cPanel> Resource usage. That was caused by the WordFence plugin which was making too many queries to the database. This can be verified from the error log below:

    [02-Jun-2020 00:34:58 UTC] PHP Warning: mysqli_query(): (HY000/2013): Lost connection to MySQL server during query in /home/challeng/public_html/wp-includes/wp-db.php on line 2024

    In order to resolve this, we renamed the WordFence’s plugin’s folder and that deactivated it. If you wish you can get in touch with Wordfence and provide them with the error above and explain the situation.”

    I want to restart wordfence – so can anyone explain what to do? – Just one extra piece of information – I believe this may be related to a message I received from the site after upgrading the wordfence plugin:

    Hi!

    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, Wordfence Security.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Below is my system information however when I asked my host (Bigscoots) “to increase your MySQLi database read_timeout” (as your support person suggested) they agreed and were able to enable Wordfence without the site crashing. So these stats are after the change:

    Host Bigscoots

    System / Server information
    Operating System Linux
    Web Server LiteSpeed

    WordPress
    Version 5.4.1
    Memory Limit 40M (Max 368M)

    PHP
    Version 7.3.18
    SAPI litespeed
    Memory Limit 368M
    Max Execution Time 30 (default) – is dynamic
    Architecture 64-bit

    MySQL
    Version 10.3.23
    Wait Timeout 28800
    Max Allowed Packets 536870912

    Thread Starter ianro

    (@ianro)

    Hi

    Is there any progress on this please?

    Thanks

    ian

    My host Bigscoots increased memory limits one of my accounts and so far, no crashes. Before updating I’m also checking to see if Wordfence is running a scan and if so I wait until the scan is finished to run updates.

    Here are the new Server Settings:
    Operating System Linux
    Web Server LiteSpeed

    WordPress
    Version 5.4.2
    Memory Limit 40M (Max 512M)

    PHP
    Version 7.4.6
    SAPI litespeed
    Memory Limit 512M
    Memory In Use 87.00 MB
    Max Execution Time 30 (default) – is dynamic
    Architecture 64-bit

    MySQL
    Version 10.1.45
    Comments MariaDB Server
    Wait Timeout 28800
    Max Allowed Packets 1073741824

    Adding this in case someone looks here for answers if they have the same problem.

    Thanks for reaching out. We’ve been investigating these reports and now think we have a cause and a solution.

    One thing to note, that if you see an error in your logs about running out of memory, it may not be the same issue. It might be a case of needing to allocate more memory to PHP. PHP memory is cumulative. That means the amount set in php.ini is shared between all your plugins, your theme, and WordPress, plus any other non-WordPress apps you have installed in the site folder. We recommend changing it to 256M and upgrading to PHP 7 or above, which introduced better memory handling. If that doesn’t help, please try one of the other solutions mentioned here.

    What we found is that on some sites the emailedIssuesList row in the wfconfig table had became too large from recording hashes of previously emailed scan issues. Reinstalling Wordfence fresh (where the data and database tables are removed) was fixing the issue but this lets us know exactly where the problem was.

    There are 2 ways of fixing this.

    1. If you are comfortable using MySQL queries you can issue this command using PHPMyAdmin in your hosting control panel:
    delete from wp_wfConfig where name = ’emailedIssuesList’;

    2. If you are not comfortable with running queries do this:
    Remove and reset Wordfence, using the Wordfence Assistant plugin to remove all tables and data and then reinstall the plugin.

    We are looking at a solution to prevent it from happening again and hopefully will include it in the next release.

    Thanks always for being patient as we worked diligently to solve this for our customers. Thanks as well for reaching out and providing valuable information to help us solve it. Let us know if this solves it for you.

    Thread Starter ianro

    (@ianro)

    Thanks for that information

    Asecommended, I have deleted the old copy of Wordfence and re-installed, and at the moment the website seems to be working fine.

    The only problem is that since re-installing Wordfence, it is finding two “high severity problems” that wordfence did not previously identify. These are:

    * Unknown file in WordPress core: wp-includes/class-wp-hoook.php_bk
    * Unknown file in WordPress core: wp-includes/functions.php_bk

    (please notice the 3 “o”s in wp-hoook.php_bk – where not even Google has any reference to that spelling)

    Hey @ianro,

    The fact of the misnaming and “_bak” leads me to believe someone was working and disabled these files for some reason.

    Can you please try completely removing Wordfence either manually or by using the Wordfence Assistant plugin and let me know if it helps?

    https://www.wordfence.com/help/advanced/remove-or-reset/#remove-or-reset

    Please let me know.

    Thanks,

    Gerroald

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘latest update of wordfence crashing the site’ is closed to new replies.