redis runtime_error ai_generated true

BUSY Redis is busy running a script

ID: redis/lua-script-timeout

Also available as: JSON · Markdown
80%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7 active

Root Cause

Lua script execution exceeded lua-time-limit.

generic

Workarounds

  1. 88% success Optimize Lua script to be faster or break into smaller operations
  2. 82% success Use SCRIPT KILL if no writes, or SHUTDOWN NOSAVE as last resort

Dead Ends

Common approaches that don't work:

  1. Use SCRIPT KILL without checking if script has writes 78% fail

    If script did writes, KILL fails

  2. Set lua-time-limit to 0 85% fail

    Scripts can block Redis forever