I Have an Ubuntu 16.04 server.
When I run as root, ulimit -n
I get 1024.
When I run it as my user I get 65535.
But I want to make sure that all users, including root has the open files limit set to 65535.
The problem is that I've done everything I know to change it and still, for root it shows 1024.
Here are the things I've done:
root@sensu:/etc/security/limits.d# cat 90-nofiles.conf
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
root@sensu:/etc/security# grep nofile limits.conf
# - nofile - max number of open files
* soft nofile 65535
* hard nofile 65535
root@sensu:/etc/security# grep file-max /etc/sysctl.conf
fs.file-max = 65536
Ofcourse I ran sysctl -p
.
The problematic process is redis:
root@sensu:/proc# grep "open files" /proc/1487/limits
Max open files 4096 4096 files
Looking at the redis init file:
root@sensu:/proc# grep ulimit /etc/init.d/redis-server
ulimit -n 100001
As you see in the examples, there's no reason for this limit to be 1024 and still... it is 1024.
What could be the reason? Where is that setting that I'm missing?