FUNCTION KILL
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.
Return value
Section titled “Return value”| 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 |
Examples
Section titled “Examples”127.0.0.1:6379> FUNCTION KILL(error) NOTBUSY No scripts in execution right now.Compatibility
Section titled “Compatibility”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.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.