diff --git a/scalyr_agent/scalyr_client.py b/scalyr_agent/scalyr_client.py index c3777e4cf..3fb26b8c3 100644 --- a/scalyr_agent/scalyr_client.py +++ b/scalyr_agent/scalyr_client.py @@ -325,10 +325,17 @@ def __receive_response(self, body_str, send_time): log.log(scalyr_logging.DEBUG_LEVEL_5, 'Response was received with body \"%s\"', response) if status_code == 429: - log.error('Received "too busy" response from server. Will re-attempt', + log.warning('Received "too busy" response from server. Will re-attempt', error_code='serverTooBusy') return 'serverTooBusy', len(body_str), response + # "Server unavailable" errors mean the servers are busy, so we should retry as if + # we got an explicit "too busy" response. + if response == 'Internal error: backend server unavailable. Scalyr staff will investigate.': + log.warning('Received "server unavailable" response from server. Will re-attempt', + error_code='internalError') + return 'internalError', len(body_str), response + # If we got back an empty result, that often means the connection has been closed or reset. if len(response) == 0: log.error('Received empty response, server may have reset connection. Will re-attempt',