Skip to content

Commit 35b6df7

Browse files
committed
[monitoringlib] Set ConnectionResetError as retryable
1 parent ef1608a commit 35b6df7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

monitoring/monitorlib/fetch/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,11 @@ def build_failing_query(t0) -> Query:
719719
# ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
720720
# ...and this may be retryable
721721
retryable = True
722+
elif "ConnectionResetError" in str(e):
723+
# This error manifests as:
724+
# ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
725+
# ...and this may be retryable
726+
retryable = True
722727
else:
723728
retryable = False
724729
failure_message = f"query_and_describe attempt {attempt + 1} from PID {os.getpid()} to {verb} {url} failed with {'' if retryable else 'non-'}retryable ConnectionError: {str(e)}\nAt {get_location()}"

0 commit comments

Comments
 (0)