SOLR-12192: Error when ulimit is unlimited

This commit is contained in:
Erick Erickson 2018-05-08 09:54:40 -07:00
parent 85c00e77ef
commit abb57c5c81
2 changed files with 4 additions and 2 deletions

View File

@ -223,6 +223,8 @@ Bug Fixes
MiniSolrCloudCluster.deleteAllCollections will now first delete aliases since a collection cannot be deleted if an
alias refers to it. (David Smiley)
* SOLR-12192: Fixed a solr cli error message when ulimits are unlimited. (Martijn Koster)
Optimizations
----------------------

View File

@ -1455,13 +1455,13 @@ if [ -z "$SOLR_ULIMIT_CHECKS" ] || [ "$SOLR_ULIMIT_CHECKS" != "false" ]; then
if hash ulimit 2>/dev/null; then
openFiles=$(ulimit -n)
maxProcs=$(ulimit -u)
if [ $openFiles -lt "$SOLR_RECOMMENDED_OPEN_FILES" ]; then
if [ $openFiles != "unlimited" ] && [ $openFiles -lt "$SOLR_RECOMMENDED_OPEN_FILES" ]; then
echo "*** [WARN] *** Your open file limit is currently $openFiles. "
echo " It should be set to $SOLR_RECOMMENDED_OPEN_FILES to avoid operational disruption. "
echo " If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh"
fi
if [ $maxProcs -lt "$SOLR_RECOMMENDED_MAX_PROCESSES" ]; then
if [ $maxProcs != "unlimited" ] && [ $maxProcs -lt "$SOLR_RECOMMENDED_MAX_PROCESSES" ]; then
echo "*** [WARN] *** Your Max Processes Limit is currently $maxProcs. "
echo " It should be set to $SOLR_RECOMMENDED_MAX_PROCESSES to avoid operational disruption. "
echo " If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh"