Repository navigation
Fail over RabbitMQ connections that remain blocked - #237
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #192.
Detect RabbitMQ connections that remain broker-blocked beyond the configured timeout and trigger recovery through the existing connection-generation and multi-host reconnect path, even when the AMQP connection remains open and heartbeats continue.
Root cause
The client logged
connection.blockedandconnection.unblockedevents but did not initiate recovery when a block persisted.RabbitMqServicerelied onConnectionLost, normally triggered by connection shutdown, to start reconnection.Additionally,
ConnectionBlockedTimeoutSecondswas assigned toRequestedConnectionTimeout, which controls connection establishment rather than the duration a live connection may remain blocked.Consequently, a broker experiencing a disk or memory alarm could remain connected indefinitely while publishers were unable to make progress.
Changes
TimeProvider.ConnectionBlockedTimeoutSecondscontrols the maximum continuous blocked duration.SocketTimeoutSecondscontrols socket read/write timeouts and RabbitMQRequestedConnectionTimeout.Configuration
SocketTimeoutSecondsConnectionBlockedTimeoutSecondsRpcTimeoutSecondsBoth settings default to 30 seconds. Deployments that previously relied on a larger
ConnectionBlockedTimeoutSecondsvalue to control connection-establishment timeout should review theirSocketTimeoutSecondsconfiguration.Validation
VectorNNTPD.BackFillerService.Tests(Release x64): 1,344 passedVectorNNTPD.Common.Tests(Release x64): 1,139 passeddotnet format VectorNNTP.slnx --verify-no-changes: passedtools/Invoke-CodeQlAnalysis.ps1: completed successfully; no findings on the changed RabbitMQ files. Six pre-existing findings remain inNntpSessionPool.cs.Correctness guarantees