I have a Kubernetes Multinode system set up 3 three nodes. I am creating a connection between a pod on Node 2 to the Arango deployment using PyArango, the Arango Deployment has two coordinator pods one on Node 2 and one on Node 3.
I'm testing out how resilient the system is and I've noticed an issue. It seems that if I'm updating collections on Arango and my program (running on Node 2) connects to the Arango Coordinator pod on Node 3 and I power off Node 3, the connection will not time out, it will simply stay put for as long as 20 minutes.
I want the connection to timeout if the connection is idle or getting no response after 30 seconds.
I've tried some different things using the PyArango methods and no luck. How do I get python or PyArango to timeout on a stale connection asap?
At the minute this is my a snippet of the connection settings code:
retry_policy = Retry(total=0, connect=0, read=0 ,
other=0, backoff_factor=0)
while conn == None:
try:
conn = Connection(arango_url, username, password,
max_retries=retry_policy)
conn.session.session.headers['Retry-After'] = '10'
conn.session.session.headers['Keep-Alive'] = 'timeout=5'
else:
conn = Connection(arangoURL=arango_url, max_retries=retry_policy)
conn.session.session.headers['Retry-After'] = '10'
conn.session.session.headers['Keep-Alive'] = 'timeout=5'
Any help would be great!