Unable to start PHP-FPM: Too many open files (24)

Follow

Comments

3 comments

  • Avatar
    Peter Debik

    Tested with 1018 subscriptions on PHP 7.0 FPM. On creation of no. 1018 through the client utility:

    ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/phpinimng' '--type' 'fpm' '--service' 'plesk-php70-fpm' '--poold' '/opt/plesk/php/7.0/etc/php-fpm.d' '--restart'] with exit code [1]
    [2017-06-12 16:27:01] ERR [panel] Remove PHP-FPM config for <domain.tld> due to service failure: phpinimng failed: Job for plesk-php70-fpm.service failed because the control process exited with error code. See "systemctl status plesk-php70-fpm.service" and "journalctl -xe" for details.
    Failed to reload plesk-php70-fpm service

    But: Same command executed standalone on the console:
    # /usr/local/psa/admin/bin/phpinimng '--type' 'fpm' '--service' 'plesk-php70-fpm' '--poold' '/opt/plesk/php/7.0/etc/php-fpm.d' '--restart'
    restarts the service without problems.

    So likely it not sufficient to add the rlimit-directive to the PHP FPM configuration file, but Plesk needs some upgraded open files limit, too. nginx, psaadm can open 500000 files, too, what else could be causing this?

  • Avatar
    Peter Debik (Edited )

    The article must be updated. The correct file location is not given by the

    # php-fpm --test

    command, because that only gives the location of the OS vendor's default PHP FPM service. However, for Plesk the relevant files are located here:

    /opt/plesk/php/<PHP version>/etc/php-fpm.conf

    So changing rlimit_conf in the OS vendor's PHP version will do nothing for actual Plesk webspace usage as most users will not use the outdated vendor versions, but the PHP versions that come with Plesk. After I have edited the "correct" php-fpm.conf file and restarted the service, the client for creating a subscription no longer gives a "open files" limit error as stated in the previous post.

  • Avatar
    Yulia Plokhotnikova

    Thanks Peter, your comments help a lot! I corrected the article.

Please sign in to leave a comment.