Ispconfig nginx error: TOO MANY OPEN FILES

Discussion in 'Installation/Configuration' started by jis, Sep 2, 2021.

  1. jis

    jis New Member

    Debian10
    ISPConfig Version: 3.2.4
    nginx/1.14.2
    php7.3-fpm
    mysql Ver 15.1 Distrib 10.3.29-MariaDB

    Hi,

    We have an ispconfig cluster with a lot of web, more than 700 for each server, now usually we have an error in the main server, when we add a new web, we get an vhost.err, and when we check nginx logs errors:

    open() "/var/log/ispconfig/httpd/xxxxxxxxx/access.log" failed (24: Too many open files)

    After read a lot of articles we changed this options:
    lsof | wc -l
    124438
    vi /etc/security/limits.conf (test it before with different values)
    root soft nofile unlimited
    root hard nofile unlimited
    * soft nofile unlimited
    * hard nofile unlimited
    mysql soft nofile 655350
    mysql hard nofile 655350


    vi /etc/sysctl.conf:
    fs.file-max = 190000

    vi /etc/nginx/nginx.conf
    worker_rlimit_nofile 250000;
    events {
    worker_connections 4000;
    ...
    }

    But nothings works, Any idea? can you help me please?

    Thanks
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Did you reboot after making those changes?
     
  3. jis

    jis New Member

    Thanks for your reply Jesse, I did systctl -p to apply those changes and I restarted nginx, php-fpm and mysql as well.
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    You need to reboot. Or if you really can't for whatever reason, try adding 'session required pam_limits.so' to both /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive and restart all the services again.
     
  5. jis

    jis New Member

    Ok I will try to don't restart the server, perfect I will tell you the result, thanks a lot!
     
  6. jis

    jis New Member

    I restarted the server but still does not work...
    Any idea?

    Thanks.
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

Share This Page