SCRIPT KILL
Since 1.1.0Scripting
Syntax
SCRIPT KILLStops the script running, if it has not written anything. While a script has run longer than lua-time-limit (5 seconds by default), other clients' commands get BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.. SCRIPT KILL and SHUTDOWN NOSAVE still get through.
Reply
OK; the script's client getsERR Script killed by user.ERR No scripts in execution.if none is running.UNKILLABLE Sorry the script already executed write commands against the dataset.if the script has written. It runs on, and the server stays busy until it ends orSHUTDOWN NOSAVE. Before 1.2, this was answeredOK, and the script ran on all the same.
Examples
client 1> EVAL "local i=0 while true do end" 0
client 2> GET greeting
(error) BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.
client 2> SCRIPT KILL
OK
client 1>
(error) ERR Script killed by user