Skip to main content

ERROR: failed to prepare the stderr pipe: Too many open files (24)

Comments

3 comments

  • cPanelLauren
    I've actually seen this previously - what is the output of the following? cat /proc/`pgrep fpm -u 0`/limits | grep 'Max open files'
    I did also notice that you've modified the 90-nproc.conf file as this is the default: cat /etc/security/limits.d/90-nproc.conf # Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 1024 root soft nproc unlimited
    In a lot of cases this has been really low and the services were inheriting the system values. I've seen this resolved in cases for cPanel PHP-FPM on CentOS 6 and Apache PHP-FPM on CentOS 7 but not for Apache PHP-FPM on CentOS 6. On CentOS 7 the resolution was to add some systemd configuration drop-in files. For CentOS 6 with cPanel PHP-FPM the resolution was to create a new .conf include in /var/cpanel/php-fpm.d/ # cat /var/cpanel/php-fpm.d/rlimit.conf [global] rlimit_files = 4096
    This wouldn't be where you'd add an include for Apache PHP-FPM though, this would need to be added to /opt/cpanel/ea-php71/root/etc/php-fpm.d/
    as follows: [root@centos6 php-fpm.d]# cat /opt/cpanel/ea-php71/root/etc/php-fpm.d/rlimit.conf [global] rlimit_files = 4096
    since that's where ALL of the conf files for ea-php71 reside and the master conf file includes from here: [root@centos6 etc]# grep include /opt/cpanel/ea-php71/root/etc/php-fpm.conf include=/opt/cpanel/ea-php71/root/etc/php-fpm.d/*.conf
    Then restart the service with the following: /scripts/restartsrv_apache_php_fpm --stop /scripts/restartsrv_apache_php_fpm --start
    Ultimately though, I can't help but wonder if this is not occurring due to some configuration changes that have been made on the system, you might try the proposed resolution and let me know if that works, I'm not 100% certain on it though it does appear that it should work.
    0
  • APatchworkBoy
    Thanks @cPanelLauren - shall give that a whirl on Monday and let you know. It"s all being caused by our net connection being maxed out and a custom web app handling it badly... problem only lasts a few minutes - I just need to get the server to survive those few minutes until I get chance to add some suitable timeout/retry-middleware to thenetworg"s oauth2-client. In meantime the app just keeps trying, as do the users, and more and more pools fire up until our connection clears. Bad coding on my part generally!
    0
  • cPanelLauren
    Ahh, well at the end of the day, at least you know the underlying cause. I'll await your update Monday!
    0

Please sign in to leave a comment.