1

(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??

0

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.