-
Notifications
You must be signed in to change notification settings - Fork 12
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
chore: removed ping in favor of keepalive #86
Conversation
f7bf8e6
to
b14048c
Compare
b14048c
to
1d97b19
Compare
c7f6a71
to
bec1cf6
Compare
@@ -10,6 +10,8 @@ on: | |||
|
|||
jobs: | |||
test: | |||
env: | |||
CI: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to be able to distinguish between local and CI, for customizing the environment if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not entirely sure if github doesn't add it themselves, but good anyway.
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
We observed that
limitd-redis
fails to promptly detect a stale TCP connection to Redis, only realizing the connection is down after approximately 12 minutes. After this delay, it reconnects as expected.This update enables the
keepAlive
feature in ioredis, which sets theKEEPALIVE
option on the socket. This allows for a quicker reaction to stale connections.Key changes:
keepAlive
feature is enabled by default and set to 10000 ms.keepAlive
interval can be customized by passing thekeepAlive
argument to theLimitdRedis
constructor.keepAlive
argument to a non-numeric value will disable the feature.keepAlive
feature.Testing
This change adds test coverage for new/changed/fixed functionality
Using the previous limitd-redis version:
Checklist