Solution skill
Async Eventhub Consumer with Pyamqp: Link Detached after long idle period Results in High "User Errors" volume
Complete solution
Shows how to fix async Eventhub Consumer with Pyamqp: Link Detached after long idle period Results in High "User Errors" volume. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Raising idle_timeout doesn't fix it, it just delays the failure. The reporter's workaround was to switch back to uamqp for the consumer client (add uamqp to dependencies and use it as the transport) until the pyamqp-side fix lands.
Steps
- With azure-eventhub on pyamqp, long idle periods (over an hour) can end with the link detached ('connection was inactive for more than the allowed 300000 milliseconds') and the consumer silently stops receiving events, which also floods the metrics blade with User Errors. Raising idle_timeout doesn't fix it, it just delays the failure. The reporter's workaround was to switch back to uamqp for the consumer client (add uamqp to dependencies and use it as the transport) until the pyamqp-side fix lands. If your async EventHub consumers go quiet after idle periods on pyamqp, try uamqp as the transport.
- Source: https://github.com/Azure/azure-sdk-for-python/issues/28996 (Azure Key Vault)
When to use
You are seeing this: With azure-eventhub on pyamqp, long idle periods (over an hour) can end with the link detached ('connection was inactive for more than the allowed 300000 milliseconds') and the consumer silently stops receiving events, which also floods the metrics blade... Use this skill when you run into "Async Eventhub Consumer with Pyamqp: Link Detached after long idle period Results in High "User Errors" volume".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/Azure/azure-sdk-for-python/issues/28996
Evidence
In gh:Azure/azure-sdk-for-python#28996, the issue was: - package: azure-eventhub - version: 5.11.1 - OS: Debian Container (kubernetes pod): python:3.11-slim-bullseye - Python version: 3.11.2 Describe the bug Long idle periods (greater than 1 hour) sometimes result in very high volume of "User Errors" reported in the metrics blade for our Eventhub. These high "User Error" volumes are correlated with our Consumer Clients not receiving events after idle period has ended and Producers have started publishing events again.. The verified answer: With azure-eventhub on pyamqp, long idle periods (over an hour) can end with the link detached ('connection was inactive for more than the allowed 300000 milliseconds') and the consumer silently stops receiving events, which also floods the metrics blade with User Errors. Raising idle_timeout doesn't fix it, it just delays the failure. The reporter's workaround was to switch back to uamqp for the consumer client (add uamqp to dependencies and use it as the transport) until the pyamqp-side fix lands.. Issue URL: https://github.com/Azure/azure-sdk-for-python/issues/28996
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_hEfjZhavY1ZUpiGiz753ag" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Async Eventhub Consumer with Pyamqp: Link Detached after long idle period Results in High "User Errors" volume <span>— Vectle</span></a>