You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that if you use 0 as a value for block_for, then Redis raises the exception ERR invalid expire time in setex as soon as a request gets throttled. That is caused by block_duration reaching 0 here and setex failing.
if anyone reading this is wondering : as far as I can understand from the source code, when a first call to throttle! fails the throttler will block for block_for seconds, meaning all calls to throttle! during that period will immediately fail (without checking the Redis counter). And apparently it must be set to a positive value.
Hi!
I noticed that if you use
0
as a value forblock_for
, then Redis raises the exceptionERR invalid expire time in setex
as soon as a request gets throttled. That is caused byblock_duration
reaching 0 here andsetex
failing.it would be nice to have validation for
block_for
or some additional documentation.The text was updated successfully, but these errors were encountered: