Redis Script kill Command
The Redis Script kill command is used to kill the currently running Lua script. This command takes effect if and only if the script has not performed any write operations.
This command is mainly used to terminate scripts that have been running for too long, such as a script that enters an infinite loop due to a bug.
After SCRIPT KILL is executed, the currently running script will be killed. The client that executed the script will exit from the blocking of the EVAL command and receive an error as the return value.
Syntax
The basic syntax of the Redis Script kill command is as follows:
redis 127.0.0.1:6379> SCRIPT KILL
Available Versions
>= 2.6.0
Return Value
Always returns OK
Example
redis 127.0.0.1:6379> SCRIPT KILL OK
Other Extensions