Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis Script Kill Command

Redis Script Kill Command

Redis Scripting

The Redis Script Kill command is used to kill the currently running Lua script; it only takes effect when the script has not performed any write operations.

This command is mainly used to terminate scripts that run 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 is killed, and the client executing the script exits the blocking of the EVAL command and receives 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 Version

= 2.6.0

Return Value

Always returns OK

Example



redis 127.0.0.1:6379> SCRIPT KILL

OK

Redis Scripting