Redis: (error) NOSCRIPT No matching script. Please use EVAL.
EVALSHA referenced a script hash the server doesn't have cached (after restart, failover, or SCRIPT FLUSH).
NOSCRIPT No matching script. Please use EVAL.(error) NOSCRIPT No matching script. Please use EVAL.ReplyError: NOSCRIPT No matching scriptredis.exceptions.NoScriptError: No matching script. Please use EVAL.NOSCRIPT No matching script Meaning
Script caches aren't persisted or replicated reliably. Clients should fall back to EVAL (libraries like ioredis defineCommand, redis-py register_script do this automatically). If your code calls EVALSHA directly, catch NOSCRIPT and call SCRIPT LOAD/EVAL. In Redis 7 consider Functions (FCALL).
Common causes
- Redis restarted / failed over / replica promoted
SCRIPT FLUSHexecuted- Different node (cluster) without the script
- Hash computed incorrectly
- Managed service flushing script cache
⚡ Quick fix
- Use library helpers that auto-reload scripts (
register_script,defineCommand) - On NOSCRIPT:
SCRIPT LOADthen retry or useEVAL - Consider Redis Functions
Detailed fix by platform
Python
script = r.register_script(lua); script(keys=[k], args=[v]) # auto-falls back to EVAL
How to diagnose
- Cause — Restart/failover/flush?
- Client — Auto reload?
- Alternative — Functions?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- BullMQ: Missing lock for job / job stalled more than allowable limit BullMQ: Error: Missing lock for job 42. moveToFinished / job stalled more than allowable limit
- BUSY Redis is busy running a script Redis: (error) BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE
- Celery with Redis: tasks run twice (visibility_timeout) Celery: Task executed twice / Restoring unacked messages — Redis broker visibility_timeout shorter than task ETA
Most viewed in Redis
- READONLY You can't write against a read only replica Redis: READONLY You can't write against a read only replica
- MISCONF Redis: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
- OOM command not allowed Redis: OOM command not allowed when used memory > 'maxmemory'
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026