Skip to content

[ServiceBus] Document aiohttp>=3.14.0 recommendation for AmqpOverWebsocket (#44028) - #48037

Merged
pranz1996 merged 3 commits into
Azure:mainfrom
pranz1996:fix/servicebus-websocket-heartbeat-44028
Jul 15, 2026
Merged

[ServiceBus] Document aiohttp>=3.14.0 recommendation for AmqpOverWebsocket (#44028)#48037
pranz1996 merged 3 commits into
Azure:mainfrom
pranz1996:fix/servicebus-websocket-heartbeat-44028

Conversation

@pranz1996

Copy link
Copy Markdown
Member

Summary

Documents that azure-servicebus users on the async AmqpOverWebsocket transport should use aiohttp>=3.14.0. This resolves customer issue #44028 ("Service Bus WebSocket connection breaks after 15 seconds"), which is an upstream aiohttp bug, not an azure-servicebus defect.

Root cause

On aiohttp < 3.14.0, the WebSocket heartbeat timer was only reset inside receive() after a full message was read. During long message processing (no socket read for ~15s), aiohttp sends its PING, the PONG is not serviced within the ~5s window, and aiohttp closes the transport at ~15s -- surfacing as ErrorCondition.SocketError: "Cannot write to closing transport".

Fixed upstream by aio-libs/aiohttp#12030, which moves the heartbeat reset to the protocol-level data_received callback. Shipped in aiohttp 3.14.0 (2026-06-01) and was not backported to 3.13.x.

Validation (definitive bisect)

Reporter's exact pattern (default receiver, prefetch_count=0, AutoLockRenewer, sleep 14-17s/msg) against a live Standard namespace, unchanged SDK, varying only aiohttp:

aiohttp Result
3.13.5 BROKE (reproduces #44028)
3.14.1 OK

An SDK-side keep-alive interval cap was prototyped and empirically invalidated (still broke on aiohttp 3.13.5), so no code change is made -- this is docs-only.

Changes

  • CHANGELOG.md: added an "Other Changes" note under 7.15.0 (Unreleased) recommending aiohttp>=3.14.0 and describing the symptom + upstream fix.

Why docs-only

aiohttp is an optional, lazily-imported dependency (no version floor declared). The repo convention is to document aiohttp version behavior in the CHANGELOG rather than add runtime version nagging (see azure-core and azure-eventhub changelog precedents).

Testing

No code changed; no test impact. CHANGELOG-only.

Related Work

…ocket (Azure#44028)

Resolves customer issue Azure#44028. Root cause is an upstream aiohttp bug (aio-libs/aiohttp#12030) fixed in aiohttp 3.14.0, not an azure-servicebus defect. Adds a CHANGELOG Other Changes note recommending aiohttp>=3.14.0 for the async AmqpOverWebsocket transport.
@pranz1996
pranz1996 marked this pull request as ready for review July 14, 2026 00:43
@pranz1996
pranz1996 requested a review from j7nw4r as a code owner July 14, 2026 00:43
Copilot AI review requested due to automatic review settings July 14, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents the aiohttp>=3.14.0 recommendation for async Service Bus WebSocket users affected by upstream heartbeat failures.

Changes:

  • Adds the recommendation and links the upstream fix and customer issue.
  • Describes the resulting socket error.

Comment thread sdk/servicebus/azure-servicebus/CHANGELOG.md Outdated

@SwayGom SwayGom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. This is a well-scoped, documentation-only CHANGELOG update with no code, API, or behavior impact.

The aiohttp>=3.14.0 recommendation is correctly scoped to Python 3.10+, and the explicit Python 3.9 caveat accurately explains that users must upgrade Python before they can install a release containing the fix. That also resolves the earlier reviewer concern. The entry is placed consistently under the unreleased Other Changes section, and all checks are green. LGTM.

@pranz1996
pranz1996 merged commit f0ac2f5 into Azure:main Jul 15, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants