mirror of
https://github.com/fluencelabs/redis
synced 2025-06-22 13:31:32 +00:00
Two small fixes to maxclients handling.
1) Don't accept maxclients set to < 0 2) Allow maxclients < 1024, it is useful for testing.
This commit is contained in:
@ -1135,7 +1135,6 @@ void adjustOpenFilesLimit(void) {
|
||||
rlim_t maxfiles = server.maxclients+32;
|
||||
struct rlimit limit;
|
||||
|
||||
if (maxfiles < 1024) maxfiles = 1024;
|
||||
if (getrlimit(RLIMIT_NOFILE,&limit) == -1) {
|
||||
redisLog(REDIS_WARNING,"Unable to obtain the current NOFILE limit (%s), assuming 1024 and setting the max clients configuration accordingly.",
|
||||
strerror(errno));
|
||||
|
Reference in New Issue
Block a user