Fix for RLIMIT patch (#12882)

Implement new soft limit introduced by https://github.com/ray-project/ray/pull/12853.
This commit is contained in:
architkulkarni
2020-12-15 10:38:46 -08:00
committed by GitHub
parent de7848231c
commit ba12fb1451
+1 -1
View File
@@ -613,7 +613,7 @@ def init(
logger.debug("Automatically increasing RLIMIT_NOFILE to max "
"value of {}".format(hard))
try:
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
resource.setrlimit(resource.RLIMIT_NOFILE, (soft, hard))
except ValueError:
logger.debug("Failed to raise limit.")
soft, _ = resource.getrlimit(resource.RLIMIT_NOFILE)