From ba12fb14516bf4d084944f6d42ed2bbedc288587 Mon Sep 17 00:00:00 2001 From: architkulkarni Date: Tue, 15 Dec 2020 10:38:46 -0800 Subject: [PATCH] Fix for RLIMIT patch (#12882) Implement new soft limit introduced by https://github.com/ray-project/ray/pull/12853. --- python/ray/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/worker.py b/python/ray/worker.py index d66ed20b9..cc231f7fa 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -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)