I've just deployed a nameko service (http) which calls another nameko
service over rpc and am getting this error randomly but quite often.
RpcConnectionError("Disconnected while waiting for reply")
While this error is happening I can see from the rabbitmq management
interface that messages are being processed.
Here's the stack-trace
RpcConnectionError: Disconnected while waiting for reply
File "nameko/containers.py", line 405, in _run_worker
result = method(*worker_ctx.args, **worker_ctx.kwargs)
File "newrelic/api/background_task.py", line 102, in wrapper
return wrapped(*args, **kwargs)
File "./app/helpers/monitoring.py", line 18, in wrapper
return func(*args, **kwargs)
File "./app/helpers/decorators.py", line 16, in wrapper
response = func(*args, **kwargs)
File "./app/service.py", line 65, in process_event
self.handle_process_elements(event_data=event_data)
File "./app/service.py", line 77, in handle_process_elements
user_id=event_data['user_id']
File "./app/components/handlers/thing_handler.py", line 22, in
handle_selected_elements
user_id=user_id)
File "nameko/rpc.py", line 395, in __call__
return reply.result()
File "nameko/rpc.py", line 376, in result
self.resp_body = self.reply_event.wait()
File "eventlet/event.py", line 121, in wait
return hubs.get_hub().switch()
File "eventlet/hubs/hub.py", line 294, in switch
return self.greenlet.switch()
What could cause this to occur? And why does the that code in nameko raise
an error on re-connection?
I'm fairly new to working with these services so could do with an
explanation of that part of the code.
The call it's failing on is fairly simple, however if I ssh into the
machine and run it manually I'm unable to reproduce the connection error.
stuff = self.stuff_rpc.get_stuff(user=123)
Thanks in advance