I am using Redis caching server on CentOS, where Redis accepts clients connections on the configured listening TCP port. I am trying to figure out the limits applied by the operating system to the number of connection allowed to the single configured port for redis.
The user being used is root
as shown:
[root@server-001]# ps -ef | grep -i redis
root 19595 1 9 Jun26 ? 09:43:07 /usr/local/bin/redis-server 0.0.0.0:6379
Now I am tricked by multiple factors:
1st: the value of file-max is:
[root@server-001]# cat /proc/sys/fs/file-max
6518496
2nd: the value of limits.conf
:
[root@server-001]# cat /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 4096
root soft nproc unlimited
3rd: The soft and hard limit of file descriptors:
[root@server-001]# ulimit -Hn
4096
[root@server-001]# ulimit -Sn
1024
Now, knowing that the the real factor limits connection to a single port is file descriptors, which one I have to change to make sure that the redis server is accepting as much clients as it is possible?