Redis/Valkey: BUSY Redis is busy running a script

A long-running Lua script exceeded lua-time-limit and is blocking the single-threaded event loop.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.0.0
Identifier: Redis/Valkey: BUSY Redis is busy running a script Platform: Redis / Valkey

Interactive Diagnostic Checklist

Safe Diagnostic Command:
redis-cli SLOWLOG GET 10

Technical Explanation

A long-running Lua script exceeded lua-time-limit and is blocking the single-threaded event loop. Verified resolution path: Optimize O(N) Lua loops and avoid blocking commands like KEYS * in production.

Worked Examples

  • Read-only diagnostic command: redis-cli SLOWLOG GET 10

Limitations & Assumptions

  • Always verify which infrastructure layer (CDN, Nginx, runtime, OS, or database) emitted the error before modifying production config.

Source References & Verification

Resource ID: err-redis-busy-lua-script · Independently verified: 2026-11-25

Related Resources