fastapi-limiter icon indicating copy to clipboard operation
fastapi-limiter copied to clipboard

NOSCRIPT No matching script. Please use EVAL error

Open gtoonstra opened this issue 3 years ago • 2 comments

Looking at FastAPI rate limiter v0.1.4 , we got an error after restarting Redis:

   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 52, in app
     response = await func(request)
   File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 204, in app
     solved_result = await solve_dependencies(
   File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 548, in solve_dependencies
     solved = await call(**sub_values)
   File "/usr/local/lib/python3.8/site-packages/fastapi_limiter/depends.py", line 42, in __call__
     pexpire = await redis.evalsha(
 aioredis.errors.ReplyError: NOSCRIPT No matching script. Please use EVAL.

fastapi-limiter==0.1.4 aioredis==1.3.1 fastapi==0.65.2

We've never seen this error before, but think it is should be similar to:

https://github.com/OptimalBits/bull/issues/1445

gtoonstra avatar Oct 19 '21 09:10 gtoonstra

Did redis open persistence?

long2ice avatar Oct 19 '21 12:10 long2ice

Yes, it is configured to use AOF: redis-server --appendonly yes --appendfsync always --dir /data1

gtoonstra avatar Oct 20 '21 07:10 gtoonstra