Failed to open stream: Too many open files

Home Forums BulletProof Security Pro Failed to open stream: Too many open files

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #40821
    Living Miracles
    Participant

    Hello,

    Two days ago we upgraded the BPS Pro plugin from 15.8 to 15.9 across 30+ sites. Ever since, we’ve been seeing the following recurring PHP Warnings and Fatal Errors:

    2021-10-15 19:55:03 UTC [apache][php7:warn] [pid 54627] [client ##.###.###.###:#####] PHP Warning: file_put_contents(/home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/admin/htaccess/plugins-htaccess-master.txt): failed to open stream: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/firewall-autopilot.php on line 1117
    ‮
    2021-10-15 19:55:03 UTC [apache][php7:warn] [pid 54627] [client ##.###.###.###:#####] PHP Warning: file_put_contents(/home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/admin/htaccess/plugins.htaccess): failed to open stream: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/firewall-autopilot.php on line 1127
    ‮
    2021-10-15 19:55:03 UTC [apache][php7:warn] [pid 54627] [client ##.###.###.###:#####] PHP Warning: file_put_contents(/home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/admin/htaccess/plugins-allow-from.txt): failed to open stream: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/firewall-autopilot.php on line 1138
    ‮
    2021-10-15 19:55:03 UTC [apache][php7:warn] [pid 54627] [client ##.###.###.###:#####] PHP Warning: file_get_contents(/home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/admin/htaccess/plugins-allow-from.txt): failed to open stream: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/firewall-autopilot.php on line 1172
    ‮
    2021-10-15 19:55:03 UTC [apache][php7:warn] [pid 54627] [client ##.###.###.###:#####] PHP Warning: file_get_contents(/home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/admin/htaccess/plugins.htaccess): failed to open stream: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/firewall-autopilot.php on line 1173
    ‮
    2021-10-15 19:55:03 UTC [apache][php7:warn] [pid 54627] [client ##.###.###.###:#####] PHP Warning: file_put_contents(/home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/admin/htaccess/plugins.htaccess): failed to open stream: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/firewall-autopilot.php on line 1202
    ‮
    2021-10-15 19:55:03 UTC [apache][php7:error] [pid 54627] [client ##.###.###.###:#####] PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/home/customer/www/example.net/public_html/wp-content/plugins): failed to open dir: Too many open files in /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/hidden-plugin-folders-cron.php:209\nStack trace:\n#0 /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/hidden-plugin-folders-cron.php(209): RecursiveDirectoryIterator->__construct('/home/customer/...')\n#1 /home/customer/www/example.net/public_html/wp-content/plugins/bulletproof-security/includes/hidden-plugin-folders-cron.php(147): bpsPro_hidden_plugins_check_alert()\n#2 /home/customer/www/example.net/public_html/wp-includes/class-wp-hook.php(303): bpsPro_hidden_plugins_check()\n#3 /home/custom

    When these occur, the sites temporarily have a critical error on them and are inaccessible. The errors do not occur when we disable the PFW AutoPilot mode. Also, as a test, we restored one site using a backup from before we updated BPS Pro (i.e., when the plugin version was 15.8), and this also seemed to resolve the errors.

    Is this an issue with version 15.9 and, if so, do you have any recommendations with how to solve it?

    Alternatively, we could try rolling back the BPS Pro plugin from 15.9 to 15.8 on our remaining sites as a temporary workaround. However, for various reasons, we aren’t able to easily restore many of our other sites. In this case, can you tell us the simplest way to revert the BPS Pro version from 15.9 to 15.8 (without doing a full-site restore)?

    #40822
    AITpro Admin
    Keymaster

    Edit|Update: 12-19-2021

    This problem was caused by a bug in the Plugin Firewall AutoPilot Mode code.  A new BPS Pro 16.1 zip file has been uploaded to the Secure Download Area. If you are experiencing this problem use the “Upgrading an existing BulletProof Security Pro Installation (Using the BPS Pro Built-in Upload Zip Installer)” steps here to install the new BPS Pro 16.1 zip file > https://forum.ait-pro.com/forums/topic/bulletproof-security-pro-bps-pro-upgrade-installation-methods/.  Or wait for BPS Pro 16.2 to be released around 1-1-2022.

    #41273
    Living Miracles
    Participant

    I can confirm that, after using the new zip file to upgrade, the errors have stopped occurring. Thank you for the fix!

    #41274
    AITpro Admin
    Keymaster

    Great!  Thanks for confirming that.

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