diff --git a/s3fs/core.py b/s3fs/core.py index 1777940d..d6eb4e45 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -118,10 +118,13 @@ async def _error_wrapper(func, *, args=(), kwargs=None, retries): except ClientError as e: logger.debug("Client error (maybe retryable): %s", e) err = e + wait_time = min(1.7**i * 0.1, 15) if "SlowDown" in str(e): - await asyncio.sleep(min(1.7**i * 0.1, 15)) + await asyncio.sleep(wait_time) + elif "reduce your request rate" in str(e): + await asyncio.sleep(wait_time) elif "XAmzContentSHA256Mismatch" in str(e): - await asyncio.sleep(min(1.7**i * 0.1, 15)) + await asyncio.sleep(wait_time) else: break except Exception as e: