Redis: (error) BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE
A long-running Lua script (or function) blocks the single-threaded server, so other commands are rejected.
BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE(error) BUSY Redis is busy running a scriptReplyError: BUSY Redis is busy running a scriptBUSY Redis is busy running a script. You can only call FUNCTION KILL or SHUTDOWN NOSAVE Meaning
After lua-time-limit (5 s default, busy-reply-threshold) Redis answers BUSY to other clients. Run SCRIPT KILL (only works if the script hasn't written) or SHUTDOWN NOSAVE as a last resort. Fix the script: remove loops over big keyspaces, avoid KEYS, batch with SCAN, and keep scripts short.
Common causes
- Infinite or long loop in Lua
- Scripts iterating large collections
KEYS *in script- Heavy EVALSHA on big data
- Deadlock-like logic waiting in script
⚡ Quick fix
redis-cli SCRIPT KILL- If it wrote data:
SHUTDOWN NOSAVE(loses unsaved data) - Rewrite scripts to be O(1)/bounded
Detailed fix by platform
Linux
redis-cli SCRIPT KILL; redis-cli CONFIG GET busy-reply-threshold
How to diagnose
- Script — Long?
- Kill — Possible?
- Fix — Bounded work?
🔧 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
- Celery with Redis: tasks run twice (visibility_timeout) Celery: Task executed twice / Restoring unacked messages — Redis broker visibility_timeout shorter than task ETA
- Client output buffer limit reached (scheduled to be closed) Redis: Client id=12 addr=10.0.0.5:51234 scheduled to be closed ASAP for overcoming of output buffer limits
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
- Redis in Docker loses data on restart (no volume) Docker: Redis data gone after container restart — dump.rdb not persisted to a volume
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