Clip RLIMIT_NOFILE increase to avoid redis failing to start on Big Sur

This commit is contained in:
Eric Liang
2020-12-14 14:05:19 -08:00
committed by Max Fitton
parent 40f77101d5
commit c21d3feccf
+2
View File
@@ -609,6 +609,8 @@ def init(
import resource
soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE)
if soft < hard:
# https://github.com/ray-project/ray/issues/12059
soft = max(soft, min(hard, 65536))
logger.debug("Automatically increasing RLIMIT_NOFILE to max "
"value of {}".format(hard))
try: