Azure / Azure/azure-sdk-for-python
Queue Receiver Failure
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
**Describe the bug**
The Service Bus queue receiver is encountering intermittent failures due to a WebSocket disconnection error. These failures occur unpredictably and are reflected in the following exception trace:
Queue Receiver failed.
Exception: Can not read frame due to exception: Websocket disconnected:
WSMessageTypeError("Received message 258: ServerTimeoutError('No PONG received after 5.0 seconds') is not WSMsgType.BINARY")
Error Condition: amqp:socket-error
The number of receiver failures varies widely - sometimes it's 0, and other times it spikes to as many as 200 failures. There is no observable pattern or specific trigger.
**Expected behavior**
The receiver should maintain a stable WebSocket connection and handle transient communication issues gracefully. Specifically, if a ServerTimeoutError('No PONG received after 5.0 seconds') occurs, it should not result in failure or an invalid message type like WSMsgTypeError(...) is not WSMsgType.BINARY. The client should retry or reconnect automatically without disrupting message consumption.
**SDK version**
^7.14.2
**Additional context**
We were previously advised to upgrade to SDK version ^7.14.2 to address similar receiver stability issues. Despite implementing that upgrade, the current version is still exhibiting the same disconnection behavior.
https://github.com/Azure/azure-sdk-for-python/pull/32061
Contributor guide
Assessment
This issue has not been assessed yet.