Unexpected CancelledError with aiohttp 3.9.x #8035
-
I've bumped aiohttp version from
The version bump was the only change in our code. I looked at #7764 and #7815 as possible culprits, but didn't see anything immediately sus. This can be an issue on our side somehow brought to light by the recent changes in aiohttp but it's difficult for me to verify, since we only get CancelledErrors in production, and I can't figure out a test case in a controlled environment. To recap:
I'm not really sure that something's wrong with aiohttp. But if someone can give me any pointers on where to look, I'd be really grateful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
It looks like cancellation is leaking upwards since it's now awaited Please open an issue with a full trace. It will be likely hard to solve without a reproducer present as it's not something that has come up before. If you can come up with a way to make it happen in a test, opening a test that is marked xfail is a sure way to demonstrate the problem and get to a solution quickly. |
Beta Was this translation helpful? Give feedback.
If it is a situation like I described, then maybe we should consider just suppressing the exception there, and ensuring that the connection is forcefully closed in that situation. That might give us the best tradeoff between reliability and keep-alive performance.