open connections in a way resilient to temporary failures
authorTomas Vondra <tomas@2ndquadrant.com>
Thu, 13 Oct 2016 11:22:49 +0000 (13:22 +0200)
committerTomas Vondra <tomas@2ndquadrant.com>
Mon, 27 Feb 2017 00:31:05 +0000 (01:31 +0100)
commit128ad6eb0c757c34b9332cd41e79efe6b73e887a
tree2463b8e67dc78ade6c8bb5548adc2fd191558f44
parentafafb8549915da7b1dddb3e355efef70586a26aa
open connections in a way resilient to temporary failures

In case of connection failure (e.g. a backend getting terminated by
OOM killer and taking down the whole server), the workers failed
with an exception without putting a result into the queue, leading
to hangs.

This fixes that by making the workers resilient to connection issues
by catching the exceptions and terminating nicely. Also, we retry
connection several times, to continue with benchmarking even after
OOM hits us unexpectedly, etc.
client/utils/misc.py