Open sverhoeven opened 6 years ago
Adding a time.sleep(1)
after the container is started I was able to connect without hangs for 20+ attempts while without sleep after about 5 attempts it hung.
I think the channel_ready_future is called when the container is not yet up. Waiting a bit gives the container enough time to start up.
Sleep is a bit hacky I propose we wait until the container is running or even healthy using the healthcheck.
Yeah I had a sleep there originally but I removed it to speed up the test suite.
Instead of sleep used
self.container.reload()
while self.container.status is 'created':
time.sleep(0.1)
self.container.reload()
The status is running
after the while loop.
Still hangups occur.
When grpc.channel_ready_future
is removed the I get
_Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string = "{"created":"@1536920082.125454765","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1099,"grpc_message":"Socket closed","grpc_status":14}"
on calling the initialize method.
When doing:
Sometimes the intepreter hangs, when killed the stack trace is