Hi all,
There's a problem I'm having a hard time to solve.
There's a redis server in the company which gets metrics from monitoring tools in the company.
Quite often, servers are unable to send metrics to the redis and when I look at the logs I can see the following error:
"ERR max number of clients reached"
Max number of clients is affected by the number of open files which the system allows, so in order to fix the issue the number of open files should be increased and that's where my problem is... even though I've increased the number of open files everywhere I could think of, it seems like the increase isn't applied.
Here's where I've increased it:root@sensu:~# grep nofile /etc/security/limits.conf
# - nofile - max number of open files
* soft nofile 100001
* hard nofile 100001
root soft nofile 100001
root hard nofile 100001
root@sensu:~# grep nofile /etc/security/limits.d/90-nofiles.conf
* soft nofile 100000
* hard nofile 100000
redis soft nofile 100001
redis hard nofile 100001
root soft nofile 100001
root hard nofile 100001
root@sensu:~# su - redis -c "ulimit -n"
100001
root@sensu:~# grep -i ulimit /etc/init.d/redis-server
ULIMIT=100001
if [ -n "$ULIMIT" ]
ulimit -n 100001
root@sensu:~# grep file.max /etc/sysctl.conf
#fs.file-max = 70000
fs.file-max = 100001
root@sensu:~# grep maxclient /etc/redis/redis.conf
maxclients 100001
And you can see it says 100001 everywhere...
but, when I check the limits of the process itself:
root@sensu:~# ps -ef | grep redis
root 15426 11910 0 08:59 pts/2 00:00:00 grep --color=auto redis
redis 30537 1 0 Mar05 ? 00:14:41 /usr/bin/redis-server
sensu.company.com:6379root@sensu:~# cat /proc/30537/limits | grep "open files"
Max open files 4081 4081 files
root@sensu:~#
I don't understand where the limit of 4081 is coming from, do you have any idea?
Thanks in advance,
Itai