-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Bug in LRU cache can cause persistent server failure #344
Comments
I can submit a PR but would like some guidance about the approach. Given that the issue is in an underlying library (if my understanding is correct) I am not sure if you want to revert to the prev. LRU cache or wait for a fix in |
probably has to be fixed in toad-cache and not here. |
I created a PR 🙌 |
Nice job! |
Thank you so much for the PR! |
@tobiasdcl 9.0.1 with the fix was released! thank you for the report and the PR |
Awesome, thank you for the super fast fix 🥳 |
Prerequisites
Fastify version
4.24.3
Plugin version
9.0.0
Node.js version
20.9.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Ubuntu 22.04
Description
Hey folks,
first of all thanks for building and maintaining this library ❤️
I found a bug in the most recent version of
fastify-rate-limit
(9.0.0
at the time of writing) when using the defaultLocalStore
.Summary
Based on my current understanding the root cause is a bug in the underlying LRU implementation toad-cache - I will create a dedicated issue there and link it here (update: done).
Impact
If triggered, all routes protected by
fastify-rate-limit
will be persitently error outSteps to Reproduce
create the following file as
repro.mjs
and then runnode repro.mjs
raw output from
node repro.mjs
:prettified stacktrace:
Expected Behavior
Expected Behavior:
Actual Behavior:
The text was updated successfully, but these errors were encountered: