From dcef90931253f69e215d61064ba2bcee597efd15 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 a24f25e16..26ebd89c8 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -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)