mirror of
https://github.com/fluencelabs/redis
synced 2025-03-21 01:50:50 +00:00
adjustOpenFilesLimit() comment made hopefully more clear.
This commit is contained in:
parent
2988889db1
commit
90a6f7fc98
@ -1576,7 +1576,10 @@ void adjustOpenFilesLimit(void) {
|
|||||||
|
|
||||||
if (bestlimit < maxfiles) {
|
if (bestlimit < maxfiles) {
|
||||||
unsigned int old_maxclients = server.maxclients;
|
unsigned int old_maxclients = server.maxclients;
|
||||||
server.maxclients = bestlimit-CONFIG_MIN_RESERVED_FDS; /* NOTICE: server.maxclients is unsigned */
|
server.maxclients = bestlimit-CONFIG_MIN_RESERVED_FDS;
|
||||||
|
/* maxclients is unsigned so may overflow: in order
|
||||||
|
* to check if maxclients is now logically less than 1
|
||||||
|
* we test indirectly via bestlimit. */
|
||||||
if (bestlimit <= CONFIG_MIN_RESERVED_FDS) {
|
if (bestlimit <= CONFIG_MIN_RESERVED_FDS) {
|
||||||
serverLog(LL_WARNING,"Your current 'ulimit -n' "
|
serverLog(LL_WARNING,"Your current 'ulimit -n' "
|
||||||
"of %llu is not enough for the server to start. "
|
"of %llu is not enough for the server to start. "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user