I'm running Ubuntu Server. This is what I've done:
/etc/security/limits.conf:
* soft nofile 10240
* hard nofile 10240
And added in /etc/pam.d/common-session:
session required pam_limits.so
And nginx conf itself /etc/nginx/nginx.conf
user www-data;
worker_processes 1; #I have only 1 core
pid /run/nginx.pid;
events {
worker_connections 10240;
# multi_accept on;
}
worker_rlimit_nofile 10240;
But trying to confirm changes:
root@ubuntu_ngix:~# ulimit -Hn
4096
root@ubuntu_ngix:~# ulimit -Sn
1024
I have restart nginx and also my server, but still nothing. What am I doing wrong here?
I'm running nginx as www-data user.