From 381fd8f7967f4122aaecba6c8785c303957e3f7c Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Thu, 23 Oct 2025 08:38:38 -0700 Subject: [PATCH] PYTHON-5629 Increase max overload retries from 3 to 5 and initial delay from 50ms to 100ms --- pymongo/asynchronous/helpers.py | 4 ++-- pymongo/synchronous/helpers.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pymongo/asynchronous/helpers.py b/pymongo/asynchronous/helpers.py index 96241b947c..b29d02ea2c 100644 --- a/pymongo/asynchronous/helpers.py +++ b/pymongo/asynchronous/helpers.py @@ -77,8 +77,8 @@ async def inner(*args: Any, **kwargs: Any) -> Any: return cast(F, inner) -_MAX_RETRIES = 3 -_BACKOFF_INITIAL = 0.05 +_MAX_RETRIES = 5 +_BACKOFF_INITIAL = 0.1 _BACKOFF_MAX = 10 # DRIVERS-3240 will determine these defaults. DEFAULT_RETRY_TOKEN_CAPACITY = 1000.0 diff --git a/pymongo/synchronous/helpers.py b/pymongo/synchronous/helpers.py index 72d8978796..2def3a8c14 100644 --- a/pymongo/synchronous/helpers.py +++ b/pymongo/synchronous/helpers.py @@ -77,8 +77,8 @@ def inner(*args: Any, **kwargs: Any) -> Any: return cast(F, inner) -_MAX_RETRIES = 3 -_BACKOFF_INITIAL = 0.05 +_MAX_RETRIES = 5 +_BACKOFF_INITIAL = 0.1 _BACKOFF_MAX = 10 # DRIVERS-3240 will determine these defaults. DEFAULT_RETRY_TOKEN_CAPACITY = 1000.0