From 1eb4ac12b1aff04b30c630f6923c89820897eec2 Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Mon, 14 Dec 2020 14:05:19 -0800 Subject: [PATCH] Clip RLIMIT_NOFILE increase to avoid redis failing to start on Big Sur --- python/ray/worker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/ray/worker.py b/python/ray/worker.py index 430f59af2..d66ed20b9 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -608,6 +608,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: