public static void printUlimits() {
Integer fileLimit = getIntFromCommand("ulimit -n");
Integer fileLimitHard = getIntFromCommand("ulimit -Hn");
Integer threadLimit = getIntFromCommand("ulimit -u");
Integer threadLimitHard = getIntFromCommand("ulimit -Hu");
StringBuilder sb
= new StringBuilder("Running with open files limit ")
.append(fileLimit)
.append(" (hard ").append(fileLimitHard).append(')')
.append(", thread limit ").append(threadLimit)
.append(" (hard ").append(threadLimitHard).append(").");
// At the time of this writing these constants correspond to somewhere
// around 250 simultaneous participants.
boolean warn = fileLimit == null || fileLimit <= 4096 ||
threadLimit == null || threadLimit <= 8192;
if (warn)
{
sb.append(" These values are too low and they will limit the ")
.append("number of participants that the bridge can serve ")
.append("simultaneously.");
logger.warn(sb);
}
else
{
logger.info(sb);
}
}
This is warning function and I see somehow it has wrong warning. Only value fileLimit <= 4096 should have warning. Here it gets 1048576 already!
So we should ignore it I guess.