Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed issue with context cancelled error leading to connection spikes on Primary instances #3190

Merged
merged 6 commits into from
Mar 5, 2025

Conversation

EXPEbdodla
Copy link
Contributor

Issue: After upgrading from 9.5.1 to 9.7.0, we noticed the spikes in connections to Master/ Primary nodes and also reads are happening from Master nodes. Also noticed increase in pool_conn_total_current metrics.

Environment: AWS Cloud, Elasticache Redis with Cluster Mode

Cause: After debugging, we noticed that nodes are marked as failed when the context.Cancelled error is raised

node.MarkAsFailing()
. This is introduced in v9.5.2.

We tested this by deploying the change from my Fork and noticed improvements. Elasticache Cluster Current Connections Screenshot:
image

FYI: My first PR to go-redis. Happy to fix if any concerns.

@EXPEbdodla
Copy link
Contributor Author

can I get a review on this PR please? Thank you.

@ndyakov
Copy link
Collaborator

ndyakov commented Feb 20, 2025

@EXPEbdodla looking into it

@ndyakov
Copy link
Collaborator

ndyakov commented Feb 20, 2025

Looks related to #3282

@ndyakov
Copy link
Collaborator

ndyakov commented Feb 21, 2025

@EXPEbdodla let's add a test for this change and we are good to go with the pr.

@EXPEbdodla
Copy link
Contributor Author

@EXPEbdodla let's add a test for this change and we are good to go with the pr.

Thanks @ndyakov . I'll look into adding tests for this.

@EXPEbdodla
Copy link
Contributor Author

@EXPEbdodla let's add a test for this change and we are good to go with the pr.

Thanks @ndyakov . I'll look into adding tests for this.

@ndyakov Added tests to this PR.

@ndyakov ndyakov merged commit 162a154 into redis:master Mar 5, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants