0

My servers are repeatedly crashing due to receiving the following error from Redis:

BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.

However, I can't seem to find a way to determine what is this "script" the message is referring to, and how I may terminate the script. Any help would be appreciated.

0

The error means that there's a long-running server-side Lua script. Such a script is invoked by the EVAL or the EVALSHA Redis commands. "Long-running" means that the script's execution time had exceeded the threshold defined by the lua-time-limit configuration directive (5000ms by default).

Because Redis is single-threaded, it responds with the "-BUSY" error after the timeout to indicate that it is still, well, busy. You can either wait for the script's execution to end or (if you've got an infinite loop for example) issue one of the commands suggested by the error to attempt to stop the script.

SCRIPT KILL will succeed only if the script performed no write operations. In case writes were made by the script, the only way to stop it is by shutting down the server without saving the changes via SHUTDOWN NOSAVE.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.