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 authored and Max Fitton committed 2020-12-20 16:58:47 -08:00
1 parent c21d3feccf
commit dcef909312
1 file changed
+1 -1
+1 -1
View File
@@ -614,7 +614,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)