From 983fd18d536d8276c564159ec193aeaf78dd9d8c Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 23 Feb 2026 12:59:07 -0700 Subject: [PATCH] fix(session): reduce default max_retries from 10 to 5 for CurlSession fix(service): reduce max_retries from 15 to 5 for HTTPAdapter --- unshackle/core/service.py | 2 +- unshackle/core/session.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unshackle/core/service.py b/unshackle/core/service.py index 66b5005..e8f9842 100644 --- a/unshackle/core/service.py +++ b/unshackle/core/service.py @@ -222,7 +222,7 @@ class Service(metaclass=ABCMeta): session.mount( "https://", HTTPAdapter( - max_retries=Retry(total=15, backoff_factor=0.2, status_forcelist=[429, 500, 502, 503, 504]), + max_retries=Retry(total=5, backoff_factor=0.2, status_forcelist=[429, 500, 502, 503, 504]), pool_block=True, ), ) diff --git a/unshackle/core/session.py b/unshackle/core/session.py index 3a4f704..3042f19 100644 --- a/unshackle/core/session.py +++ b/unshackle/core/session.py @@ -56,7 +56,7 @@ class MaxRetriesError(exceptions.RequestException): class CurlSession(Session): def __init__( self, - max_retries: int = 10, + max_retries: int = 5, backoff_factor: float = 0.2, max_backoff: float = 60.0, status_forcelist: list[int] | None = None,