You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Ubuntu Trusty/64 in /var/log/redis/redis-server.log
Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
What do I need to do to eliminate the error message? Allow redis-server to alter its ulimit accordingly (by adding some nifty sudoers rule)? Or place a custom config in
/etc/security/limits.d/myredis.conf:
@redis hard nofile 10032
You'll want the user who starts your Redis process to have permission to increase the ulimit to something larger. You can edit your limits conf to allow the user running Redis a larger default (or larger upper limit), or you can manually set it in a launch script before Redis starts since ulimit is inherited by children (ulimit -n 65535; redis-server).
If you run Redis as root (not recommended), it will set the ulimit correctly, but Redis doesn't drop permissions, so you'd be running Redis as root forever.
The reason for the near 10,000 limit is because by default Redis limits the number of connected clients to 10,000 (maxclients 10000). If you increase your maxclients number, you'll need to set more allowed open files.
Turns out Ubuntu won't allow any ulimit assignments by non-root users even if the limits.conf was changed (and the two /etc/pam.d/common-session* contain a session required pam_limits.so).
I guess the Ubuntu way is to uncomment /etc/default/redis-server and add/change its single value to ULIMIT=10032 as you recommended earlier.
IMO Ubuntu is nasty here but I see no other way other than to document it as quirk/hack. It would be nice if you could find a proper place for this detail... maybe in your FAQ?
Activity
mattsta commentedon Sep 25, 2014
You'll want the user who starts your Redis process to have permission to increase the ulimit to something larger. You can edit your limits conf to allow the user running Redis a larger default (or larger upper limit), or you can manually set it in a launch script before Redis starts since ulimit is inherited by children (
ulimit -n 65535; redis-server).If you run Redis as root (not recommended), it will set the ulimit correctly, but Redis doesn't drop permissions, so you'd be running Redis as root forever.
lusitania commentedon Sep 25, 2014
I see. So it would be safefor me to use this limits change?
The daemon is running as redis:redis by default on Ubunty Trusty. I don't want to touch that.
mattsta commentedon Sep 25, 2014
That looks like it should work.
The reason for the near 10,000 limit is because by default Redis limits the number of connected clients to 10,000 (
maxclients 10000). If you increase your maxclients number, you'll need to set more allowed open files.lusitania commentedon Sep 25, 2014
Turns out Ubuntu won't allow any ulimit assignments by non-root users even if the limits.conf was changed (and the two /etc/pam.d/common-session* contain a
session required pam_limits.so).I guess the Ubuntu way is to uncomment
/etc/default/redis-serverand add/change its single value toULIMIT=10032as you recommended earlier.IMO Ubuntu is nasty here but I see no other way other than to document it as quirk/hack. It would be nice if you could find a proper place for this detail... maybe in your FAQ?
Update RedisTimeSeries module to v8.9.80
Update RedisTimeSeries module to v8.9.80 (#15336)