Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

FUNCTION KILL

Last updated
FUNCTION KILL
Group
Scripting and functions
Complexity
O(1)
Arity
2 (exactly, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

FUNCTION KILL stops the function or script that is running on another connection, as long as it has not written anything yet. It behaves exactly like SCRIPT KILL: the caller of the stopped function gets an error, and a function that has already written cannot be stopped.

Case RESP2 RESP3
The function was stopped Simple string OK Simple string OK
Nothing is running Error NOTBUSY No scripts in execution right now. Error
The function has written Error UNKILLABLE Sorry the script already executed write commands against the dataset. ... Error
127.0.0.1:6379> FUNCTION KILL
(error) NOTBUSY No scripts in execution right now.

Same replies as Redis 7 and Valkey 8. In Redis, FUNCTION KILL stops only functions and SCRIPT KILL only EVAL scripts; in HotKV either command stops whichever is running.

SCRIPT KILL, FCALL, FUNCTION STATS