nginx worker connection error

error: nginx [warn] 8192 worker_connection are more than open file resource limit: 1024

vi /etc/sysctl.conf

fs.file-max = 70000

vi /etc/security/limits.conf

nginx       soft    nofile   10000
nginx       hard    nofile  30000

sysctl -p

# set open fd limit to 30000
worker_rlimit_nofile 30000;

# service nginx reload
# su - nginx
$ ulimit -Hn
$ ulimit -Sn

Sample outputs:

30000
10000

Leave a Reply