DBAtlas · Database operations atlas

BUSY: BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE

Redis

What 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.

Open in DBAtlas →

More from this engine