Skip to content

Commit

Permalink
Special case handling for connection timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmitterdorfer committed Mar 4, 2020
1 parent 8a666d1 commit 92bee31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion esrally/driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,10 @@ async def execute_single(runner, es, params, abort_on_error=False):
# The ES client will sometimes return string like "N/A" or "TIMEOUT" for connection errors.
if isinstance(e.status_code, int):
request_meta_data["http-status"] = e.status_code
if e.info:
# connection timeout errors don't provide a helpful description
if isinstance(e, elasticsearch.ConnectionTimeout):
request_meta_data["error-description"] = "network connection timed out"
elif e.info:
request_meta_data["error-description"] = "%s (%s)" % (e.error, e.info)
else:
request_meta_data["error-description"] = e.error
Expand Down

0 comments on commit 92bee31

Please sign in to comment.