mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
improve exponential backoff when connecting to the redis (#24150)
This commit is contained in:
parent
306853b5b8
commit
edf058d4f7
2 changed files with 4 additions and 2 deletions
|
@ -861,7 +861,9 @@ def wait_for_redis_to_start(redis_ip_address, redis_port, password=None):
|
|||
) from connEx
|
||||
# Wait a little bit.
|
||||
time.sleep(delay)
|
||||
delay *= 2
|
||||
# Make sure the retry interval doesn't increase too large, which will
|
||||
# affect the delivery time of the Ray cluster.
|
||||
delay = 1000 if i >= 10 else delay * 2
|
||||
else:
|
||||
break
|
||||
else:
|
||||
|
|
|
@ -181,7 +181,7 @@ REPORTER_UPDATE_INTERVAL_MS = env_integer("REPORTER_UPDATE_INTERVAL_MS", 2500)
|
|||
# Number of attempts to ping the Redis server. See
|
||||
# `services.py::wait_for_redis_to_start()` and
|
||||
# `services.py::create_redis_client()`
|
||||
START_REDIS_WAIT_RETRIES = env_integer("RAY_START_REDIS_WAIT_RETRIES", 16)
|
||||
START_REDIS_WAIT_RETRIES = env_integer("RAY_START_REDIS_WAIT_RETRIES", 60)
|
||||
|
||||
LOGGER_FORMAT = "%(asctime)s\t%(levelname)s %(filename)s:%(lineno)s -- %(message)s"
|
||||
LOGGER_FORMAT_HELP = f"The logging format. default='{LOGGER_FORMAT}'"
|
||||
|
|
Loading…
Add table
Reference in a new issue