BUSY: BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE
RedisWhat does it mean?
A long-running Lua script or function is executing and has exceeded busy-reply-threshold (named lua-time-limit before Redis 7; default 5000 ms). Because Redis is single-threaded, it cannot process other commands during this time; only SCRIPT KILL (FUNCTION KILL for functions) or SHUTDOWN NOSAVE is accepted.
Why does it happen?
An infinite loop or a very long-running Lua script/function, heavy computation, a script looping over large data, or a poorly written EVAL call.
How to fix it
If the script has not modified data, stop it: SCRIPT KILL. If the script has already performed writes, SCRIPT KILL does not work; as a last resort to preserve data consistency, SHUTDOWN NOSAVE may be needed (unsaved data is lost; be careful). Write scripts to be short and deterministic. Split long operations into chunks. Review the busy-reply-threshold (formerly lua-time-limit) setting.
More from this engine
- MASTERDOWNMASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'
- CLUSTERDOWNCLUSTERDOWN The cluster is down / Hash slot not served
- LOADINGLOADING Redis is loading the dataset in memory
- MISCONFMISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
- CROSSSLOTCROSSSLOT Keys in request don't hash to the same slot
- MOVEDMOVED slot ip:port (cluster redirect)
- ASKASK slot ip:port (cluster redirect)