script-kill.3valkey - Man Page

Terminates a server-side Lua script during execution.

Synopsis

SCRIPT KILL

Description

Kills the currently executing EVAL script, assuming no write operation was yet performed by the script.

This command is mainly useful to kill a script that is running for too much time(for instance, because it entered an infinite loop because of a bug). The script will be killed, and the client currently blocked into EVAL will see the command returning with an error.

If the script has already performed write operations, it can not be killed in this way because it would violate Lua’s script atomicity contract. In such a case, only SHUTDOWN NOSAVE can kill the script, killing the Valkey process in a hard way and preventing it from persisting with half-written information.

For more information about EVAL scripts please refer to valkey-eval-intro(7) Introduction to Eval Scripts.

Reply

valkey-protocol(7) Simple string reply: OK.

Complexity

O(1)

Acl Categories

@scripting @slow

History

See Also

eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-restore(3valkey), function-stats(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-load(3valkey), script-show(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual