If your nginx proxy shows such error, it means too many open files on your server and you should increase such values.
worker_rlimit_nofile 16384;
or if you are not on OpenVZ VPS, you can:
vi /etc/security/limits.conf
* hard nofile 500000
* soft nofile 500000
root hard nofile 500000
root soft nofile 500000
if it not works:
vi /etc/pam.d/common-session
session required pam_limits.so
vi /etc/sysctl.conf
fs.file-max = 2097152
sysctl -p
then cat /proc/sys/fs/file-max
Check limits of a running process:
ps aux | grep nginx
cat /proc/nginx_proc_ID/limits
Check limits for nginx user:
su – nginx -c ‘ulimit -aHS’ -s ‘/bin/bash’
ulimit -Hn / ulimit -Sn # this will show hard and soft limits
Hello still error are come.So can you please suggest any other solution