Skip to content

fix(redis): ping the subscription connection to detect half-open sockets - #5

Merged
LounisBou merged 2 commits into
mainfrom
fix/redis-subscriber-watchdog
Sep 21, 2026
Merged

LounisBou merged 2 commits into
mainfrom
fix/redis-subscriber-watchdog

Conversation

@LounisBou

@LounisBou LounisBou commented Sep 18, 2026 •

Copy link
Copy Markdown

The Redis transport opens two connections from the same DSN, one for commands and one for the pub/sub subscription. The periodic ping only reached the command connection, so a half-open subscription socket went unnoticed: the hub kept answering publish requests while every subscriber stopped receiving anything.

The ping now runs on both connections. Paired with a non-zero readTimeout it turns a silent socket into a rejected promise, which reaches Hub::die and lets the supervisor restart the hub.

This is what kept four production hubs frozen for 35 hours while the process stayed alive and the Redis instance stayed up.

Covers the ping method with two tests, so its coverage-ignore marker is gone.

@LounisBou
LounisBou marked this pull request as ready for review September 18, 2026 13:06
@ArthurRmd
ArthurRmd removed the request for review from misaert September 21, 2026 08:20
@LounisBou
LounisBou merged commit 214c71c into main Sep 21, 2026
16 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.

2 participants