← Back
Case-Study

Nginx Reverse Proxy QPS Dropped 15x: A Missing upstream keepalive and an -O0 Debug Build

  • A 15x Slower Nginx Reverse Proxy — and No Errors in the Logs
  • Flame Graphs Expose a Connection Storm: The Missing upstream keepalive
  • The Remaining 10% Gap: Baseline Comparison Points to the Compiler
  • How an -O0 Debug Build Cost Us 10% of Performance
  • A 15x Slower Nginx Reverse Proxy — and No Errors in the Logs
  • Flame Graphs Expose a Connection Storm: The Missing upstream keepalive
  • The Remaining 10% Gap: Baseline Comparison Points to the Compiler
  • How an -O0 Debug Build Cost Us 10% of Performance

Gzip CPU Usage: Why Compression Level 6 Consumed 54% of Server CPU

  • How Gzip Compression Consumed 54% of CPU in Production
  • Why Gzip CPU Usage Was So High: A Configuration-Level Diagnosis
  • Quantifying Gzip and Brotli CPU Overhead
  • From Guesswork to Data-Driven Compression Tuning
  • How Gzip Compression Consumed 54% of CPU in Production
  • Why Gzip CPU Usage Was So High: A Configuration-Level Diagnosis
  • Quantifying Gzip and Brotli CPU Overhead
  • From Guesswork to Data-Driven Compression Tuning

Nginx C++ Module Memory Leak: Root Cause in Production, No Restart

  • The Production Challenge: A C++ Module Memory Leak You Can’t Debug With GDB
  • How the Flame Graph Pinpointed the Leaking Function in ngx_dubbo_module
  • From Reactive to Proactive: XRay’s New Approach to Troubleshooting
  • The OpenResty XRay Closed-Loop Approach
  • The Production Challenge: A C++ Module Memory Leak You Can’t Debug With GDB
  • How the Flame Graph Pinpointed the Leaking Function in ngx_dubbo_module
  • From Reactive to Proactive: XRay’s New Approach to Troubleshooting
  • The OpenResty XRay Closed-Loop Approach

The Nginx Worker That Refused to Serve More Than 300 RPS: Traced to a 75ms Event-Loop Block

  • High Load but No Useful Work: CPU Contention from a Missing worker_cpu_affinity
  • How Blocking Lua I/O Calls Halted the Nginx Event Loop
  • Measuring File I/O Latency: Up to 1.5ms per Call
  • How Bad Was the Nginx Event-Loop Blocking? 43,952 Samples, a 75ms Worst Case
  • Frequently Asked Questions
  • High Load but No Useful Work: CPU Contention from a Missing worker_cpu_affinity
  • How Blocking Lua I/O Calls Halted the Nginx Event Loop
  • Measuring File I/O Latency: Up to 1.5ms per Call
  • How Bad Was the Nginx Event-Loop Blocking? 43,952 Samples, a 75ms Worst Case
  • Frequently Asked Questions

Nginx Core Dump Analysis: Catch a Worker Process Crash at the First Scene

  • The Case: Frequent Nginx Worker Process Crashes No Log Could Explain
  • Analyzing the Recording: Replaying the Crash Back to the First Scene
  • Root Cause: A Use-After-Free in Nginx’s Connection Lifecycle
  • Frequently Asked Questions
  • The Case: Frequent Nginx Worker Process Crashes No Log Could Explain
  • Analyzing the Recording: Replaying the Crash Back to the First Scene
  • Root Cause: A Use-After-Free in Nginx’s Connection Lifecycle
  • Frequently Asked Questions

Tracing an LRU Cache Memory Leak in OpenResty — Down to the Cached SSL Certificates

  • Why a Low-Traffic OpenResty App Kept Leaking Memory
  • How We Traced the LRU Cache Memory Leak, Step by Step
  • The Result: From Unbounded Growth to Stable Memory
  • Why a Low-Traffic OpenResty App Kept Leaking Memory
  • How We Traced the LRU Cache Memory Leak, Step by Step
  • The Result: From Unbounded Growth to Stable Memory

Uneven Nginx Worker CPU Usage: Tracing a Missing reuseport Flag and a cjson Hotspot

  • The Symptom: Some Nginx Workers Maxed Out While Others Sat Idle
  • How OpenResty XRay Pinpointed the Root Causes
  • The Fix: Three Optimizations and Their Measured Gains
  • Summary: What OpenResty XRay Found in Minutes
  • Frequently Asked Questions
  • What is OpenResty XRay
  • The Symptom: Some Nginx Workers Maxed Out While Others Sat Idle
  • How OpenResty XRay Pinpointed the Root Causes
  • The Fix: Three Optimizations and Their Measured Gains
  • Summary: What OpenResty XRay Found in Minutes
  • Frequently Asked Questions
  • What is OpenResty XRay

Find Leaked Lua Tables: the registry / _LOADED (package.loaded) Reference Path in OpenResty XRay

  • How LuaJIT manages memory
  • OpenResty XRay’s command-line tools
  • A leaking Lua table example
  • Breaking down memory by LuaJIT GC object type
  • Reading the lj-gco-ref flame graph: registry, _LOADED, package.loaded
  • Fully-automated Lua memory leak analysis
  • How LuaJIT manages memory
  • OpenResty XRay’s command-line tools
  • A leaking Lua table example
  • Breaking down memory by LuaJIT GC object type
  • Reading the lj-gco-ref flame graph: registry, _LOADED, package.loaded
  • Fully-automated Lua memory leak analysis
Contact us

Love to hear from you, Get in touch 👋

Message was sent successfully!

Our Team will get back to you within 24 hours.
x