Easy Tutorial
❮ Redis Client Connection Redis Security ❯

Redis Script kill Command

Redis Scripting

The Redis Script kill command is used to terminate the currently running Lua script, but only if the script has not performed any write operations.

This command is primarily used to stop scripts that run for an excessively long time, such as scripts that enter an infinite loop due to a bug.

After executing SCRIPT KILL, the currently running script is terminated, and the client executing the script exits from the blocking state of the EVAL command, receiving an error as a return value.

Syntax

The basic syntax for 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

Redis Scripting

❮ Redis Client Connection Redis Security ❯