Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Redis connections stop reconnecting if they time out while authenticating #9351

@erikjohnston

Description

@erikjohnston

If txredisapi gets an exception while waiting for the reply to AUTH, it will close the connection and disable reconnections (likely the idea is that if you get a wrong password it shouldn't keep trying). However, since any exception triggers this it can cause Synapse to permanently stop talking to redis even if the failure is transient (e.g. if the synapse process wedges at 100% CPU the AUTH request can time out).

This leads to failure modes where workers can silently stop receiving updates, or message sending stops working, etc. The only way to fix it is to manually restart the process. Not all cases will trigger alerts, so this is a fairly terrible thing to occur.

Probably the easiest way, but hacky, way of fixing this is making the continueTrying attribute on our factories ignore attempts to set it to False.

c.f. https://sentry.matrix.org/sentry/synapse-matrixorg/issues/198649/

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-MajorMajor functionality / product severely impaired, no satisfactory workaround.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions