OpenResty
Lua Blocking Operations Halt Entire Worker Process
9Lua code embedded in NGINX must be strictly non-blocking to maintain event-driven performance. Using standard Lua libraries or C libraries that perform blocking I/O (e.g., standard `os.time()` or slow file I/O) halts the entire NGINX worker, causing massive performance degradation, high latency, and request timeouts for all concurrent requests.
Lua Phase Timing and Variable Scope Cause Incorrect Routing
7Variables set in one Lua phase may not be available or may be stale in later phases if timing and scope are misunderstood. Logic relying on variables set in different phases (e.g., `set_by_lua*` vs. `access_by_lua*`) results in NGINX variables being empty or holding stale values, causing incorrect routing, logging, or access decisions.
Third-Party Lua Module Memory Leaks Cause Gradual OOM Crashes
7Errors in third-party Lua modules cause gradual, indefinite memory consumption increases leading to out-of-memory crashes. Without strict control over module versions and dependencies, operators face increased risk of subtle instability that is hard to debug.
Incomplete Lua Phase Termination Leaks Internal Headers
5Incomplete termination of Lua execution phases can lead to inconsistent logging or leaking of internal NGINX headers, causing information disclosure or incorrect log entries.