-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception swallowing in AmqpProtocol.run #90
Comments
Hello, We clearly want to tackle the problem with having an exception in the Task Could you please let us know how you initialized your queues and consumers ? |
|
I think will see this later this week. We didn't really have python 3.5 for the moment. Do you have the same behavior when running the examples ? |
Everything works well until exception like above. It is an exceptional situation I would say. |
I have the same issue (sometimes) in our production. Do you have any workaround? |
There are no workaround for now, and this is very unfortunate. I've come up with this issue myself and I'll see if I can't improve things somewhat. I'll report back if/when I find something. Cheers |
Though in this spot, catching all exceptions is an awful idea. To be addressed in issue #90.
Though in this spot, catching all exceptions is an awful idea. To be addressed in issue #90.
This exposed a bug in both environments involving async_to_sync()'s new "kill the thread executor" behavior. See Polyconseil/aioamqp#90. For now, we override the AmqpProtocol to avoid catching CancelledError.
My workaround is to subclass and pass this as the
Why does this catch-all exception handler exist? What errors does it catch that it should catch? |
aioamqp 0.7.0
RabbitMQ 3.6.1
Got an exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/aioamqp/protocol.py", line 262, in run
yield from self.dispatch_frame()
File "/usr/local/lib/python3.5/dist-packages/aioamqp/protocol.py", line 217, in dispatch_frame
yield from channel.dispatch_frame(frame)
File "/usr/local/lib/python3.5/dist-packages/aioamqp/channel.py", line 111, in dispatch_frame
yield from methods(frame.class_id, frame.method_id)
File "/usr/lib/python3.5/asyncio/coroutines.py", line 200, in coro
res = func(_args, *_kw)
File "/usr/local/lib/python3.5/dist-packages/aioamqp/channel.py", line 665, in server_basic_cancel
consumer_tag = frame.arguments['consumer_tag']
KeyError: 'consumer_tag'
And the client has stopped consuming messages after it.
I don't see any possibility to handle such situation due to exception swallowed in AmqpProtocol.run.
The text was updated successfully, but these errors were encountered: