2

(Server: Ubuntu Xenial 64bit)

/etc/security/limits.conf has the following lines:

*                soft    nofile          24576
*                hard    nofile          32768
redis            soft    nofile          24576
redis            hard    nofile          32768

I have configured the user limits for the redis user:

redis@myserver:~$ ulimit -n
24576

/etc/redis/redis.conf has the following line:

maxclients 24000

Yet, when I grab the maxclients configuration parameter I am still getting the unexpected value:

127.0.0.1:6379> config get maxclients
1) "maxclients"
2) "4064"

Could someone please explain to me what is going on here??

chicks
  • 3,793
  • 10
  • 27
  • 36
DejanLekic
  • 304
  • 3
  • 16

1 Answers1

3

After a chat to the guys on irc://irc.freenode.net/redis I modified the /etc/systemd/system/redis.service, added the following line to it:

LimitNOFILE=48000

and it all started working! So, looks like changing the limits in /etc/security/limits.conf does not help.

After systemctl restart redis-server I got the expected:

127.0.0.1:6379> config get maxclients
1) "maxclients"
2) "24000"
DejanLekic
  • 304
  • 3
  • 16