Skip to main content
InterviewHubPRO
Section Overview
Q32

Question 32 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

64%
Redis & Caching (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

What is Redis Lua Script Timeout and `SCRIPT KILL`?

senior LevelredisAdvanced Internals

In Simple Words: Because Lua scripts run atomically, an infinite loop freezes Redis completely:

  • Configured by lua-time-limit (default 5,000ms).
  • When a script exceeds the threshold, Redis accepts administrative commands and responds with -BUSY.
  • You can execute SCRIPT KILL to abort a read-only script. If the script already performed writes, SCRIPT KILL fails and you must execute SHUTDOWN NOSAVE.