← Back
Tutorial

PHP High CPU Usage: Find the Hottest Code Path with OpenResty XRay

  • Problem: high CPU usage
  • Find which PHP function is using the CPU with OpenResty XRay Guided Analysis
  • Read the CPU flame graph and the hottest PHP and C code paths
  • Automatic analysis and reports
  • What is OpenResty XRay
  • Problem: high CPU usage
  • Find which PHP function is using the CPU with OpenResty XRay Guided Analysis
  • Read the CPU flame graph and the hottest PHP and C code paths
  • Automatic analysis and reports
  • What is OpenResty XRay

How to Create and Call a Lua Module in OpenResty Edge Using Edgelang

  • How to create a Global Lua Module in OpenResty Edge
  • How to call the Lua module from Edgelang in a page rule
  • How to verify the Lua module output with curl
  • What is OpenResty Edge
  • How to create a Global Lua Module in OpenResty Edge
  • How to call the Lua module from Edgelang in a page rule
  • How to verify the Lua module output with curl
  • What is OpenResty Edge

Laravel High CPU Usage: Why Even Hello World Burns Half Its CPU

  • Why Laravel uses high CPU even in hello world apps
  • Laravel CPU profiling: the three hottest code paths
  • Automatic analysis and reports
  • What is OpenResty XRay
  • Why Laravel uses high CPU even in hello world apps
  • Laravel CPU profiling: the three hottest code paths
  • Automatic analysis and reports
  • What is OpenResty XRay

Perl Process Stuck at 13% CPU: Off-CPU Flame Graphs Pinpoint a Blocking HTTP Call

  • The symptom: Perl process CPU usage stays low under heavy requests
  • Find the blocking Perl code paths with OpenResty XRay’s off-CPU flame graphs
  • Automatic analysis and reports in the Insights page
  • FAQ
  • What is OpenResty XRay
  • About The Author
  • The symptom: Perl process CPU usage stays low under heavy requests
  • Find the blocking Perl code paths with OpenResty XRay’s off-CPU flame graphs
  • Automatic analysis and reports in the Insights page
  • FAQ
  • What is OpenResty XRay
  • About The Author

Pinpointing CPU-Hottest Go Code Paths Inside Prometheus (using OpenResty XRay)

  • Problem: high CPU usage
  • Use the guided analysis feature of OpenResty XRay to spot the CPU-hottest Go code paths
  • Automatic analysis and reports
  • What is OpenResty XRay
  • Problem: high CPU usage
  • Use the guided analysis feature of OpenResty XRay to spot the CPU-hottest Go code paths
  • Automatic analysis and reports
  • What is OpenResty XRay

How to Use OpenResty Edge Global Search to Find Request IDs, Upstreams & Apps

  • Search by Request ID and jump to the Request ID Decoder
  • Search for text on the OpenResty Edge interface
  • Search for upstreams by IP address or name
  • Search for applications by name
  • Search for blog posts
  • Search by Request ID and jump to the Request ID Decoder
  • Search for text on the OpenResty Edge interface
  • Search for upstreams by IP address or name
  • Search for applications by name
  • Search for blog posts

How to Diagnose 504 Gateway Timeout Errors in OpenResty & Nginx

  • Confirm HTTP 504 gateway timeout errors in the OpenResty/Nginx access log
  • Diagnose the 504 root cause with OpenResty XRay Guided Analysis
  • Slow upstream, slow network link, or a too-short timeout setting
  • Automatic root-cause reports on the Insights page
  • Confirm HTTP 504 gateway timeout errors in the OpenResty/Nginx access log
  • Diagnose the 504 root cause with OpenResty XRay Guided Analysis
  • Slow upstream, slow network link, or a too-short timeout setting
  • Automatic root-cause reports on the Insights page

CockroachDB High CPU Usage: Profiling a Live Go Server with Flame Graphs

  • Problem: CockroachDB high CPU usage
  • Find the most CPU-intensive Go code paths with guided analysis
  • Automatic CPU analysis and reports
  • What is OpenResty XRay
  • Problem: CockroachDB high CPU usage
  • Find the most CPU-intensive Go code paths with guided analysis
  • Automatic CPU analysis and reports
  • What is OpenResty XRay

Locate the Largest Memory Objects in a Live Perl Process

  • Symptom: a Perl process using high memory in top
  • Profile the process with OpenResty XRay guided analysis to find the largest Perl objects
  • Trace the largest object back to its source file
  • Monitor Perl process memory automatically with Insights reports
  • FAQ
  • What is OpenResty XRay
  • Symptom: a Perl process using high memory in top
  • Profile the process with OpenResty XRay guided analysis to find the largest Perl objects
  • Trace the largest object back to its source file
  • Monitor Perl process memory automatically with Insights reports
  • FAQ
  • What is OpenResty XRay

Install OpenResty XRay’s Agents on Ubuntu via Deb Packages

  • Logging in to the Console
  • Installing the Agent via Deb Packages
  • Checking the Agent Status and Logs
  • Configuring and Detecting Applications
  • Initiating Analyzers and Viewing Insights
  • Install Another Agent
  • What is OpenResty XRay
  • Logging in to the Console
  • Installing the Agent via Deb Packages
  • Checking the Agent Status and Logs
  • Configuring and Detecting Applications
  • Initiating Analyzers and Viewing Insights
  • Install Another Agent
  • What is OpenResty XRay

Performance Impact of OpenResty XRay when Tracing PHP Apps

  • What Happens to CPU, Memory, and Load During Profiling?
  • How Much Does Profiling Affect Throughput and Latency?
  • OpenResty XRay vs. Always-On APM Agents
  • FAQ
  • What Happens to CPU, Memory, and Load During Profiling?
  • How Much Does Profiling Affect Throughput and Latency?
  • OpenResty XRay vs. Always-On APM Agents
  • FAQ

Tested in Production: The Performance Impact of OpenResty XRay When Tracing Rust Applications

  • What Happens to CPU, Memory, and Load During Profiling?
  • How Much Does Profiling Affect Throughput and Latency?
  • OpenResty XRay vs. Always-On APM Agents
  • FAQ
  • What Happens to CPU, Memory, and Load During Profiling?
  • How Much Does Profiling Affect Throughput and Latency?
  • OpenResty XRay vs. Always-On APM Agents
  • FAQ

Dynamic-Tracing Custom Go Programs with Custom Ylang Analyzers (using OpenResty XRay)

  • Insert two key-value Pairs into a Go Variable
  • Write a Customize Ylang Analyzer to Dynamically Trace the Go program
  • Test the Results
  • What is OpenResty XRay
  • Insert two key-value Pairs into a Go Variable
  • Write a Customize Ylang Analyzer to Dynamically Trace the Go program
  • Test the Results
  • What is OpenResty XRay

How to Add a Custom Response Header in OpenResty Edge (No Reload)

Add a custom response header in the OpenResty Edge console via a page rule—use a static string or a built-in variable as the value, then release it to every gateway cluster with no server reload.
Add a custom response header in the OpenResty Edge console via a page rule—use a static string or a built-in variable as the value, then release it to every gateway cluster with no server reload.

User Management and Access Control in OpenResty Edge’s Web Console

  • Set Up a New Normal User Account
  • Assign a User Group and Role-Based Permissions
  • Configure Access Control for Groups and Applications
  • Test the Results by Logging In as the Normal User
  • Set Up a New Normal User Account
  • Assign a User Group and Role-Based Permissions
  • Configure Access Control for Groups and Applications
  • Test the Results by Logging In as the Normal User

Django Memory Profiler: Analyze Object-Level Memory Usage in a Live App

  • Spot a high-memory Django process with ps
  • Profile the Django app’s memory usage with Guided Analysis
  • Read the flame graph: which Python module uses the most memory
  • Monitor Django memory usage automatically with Insights
  • What is OpenResty XRay
  • Spot a high-memory Django process with ps
  • Profile the Django app’s memory usage with Guided Analysis
  • Read the flame graph: which Python module uses the most memory
  • Monitor Django memory usage automatically with Insights
  • What is OpenResty XRay

Install OpenResty XRay’s Agents on CentOS via RPM Packages

  • Logging in to the Console
  • Installing the Agent via RPM Packages
  • Checking the Agent Status and Logs
  • Configuring and Detecting Applications
  • Initiating Analyzers and Viewing Insights
  • Install Another Agent
  • What is OpenResty XRay
  • Logging in to the Console
  • Installing the Agent via RPM Packages
  • Checking the Agent Status and Logs
  • Configuring and Detecting Applications
  • Initiating Analyzers and Viewing Insights
  • Install Another Agent
  • What is OpenResty XRay

Python Memory Profiler: Find the Largest Objects Eating RAM Without Code Changes

  • Find which Python process is using the most memory
  • Profile Python memory with guided analysis: find the largest objects and their modules
  • Automatically monitor Python memory usage with scheduled reports
  • What is OpenResty XRay
  • Find which Python process is using the most memory
  • Profile Python memory with guided analysis: find the largest objects and their modules
  • Automatically monitor Python memory usage with scheduled reports
  • What is OpenResty XRay

Rust CPU Profiling: Find the Hottest Code Paths in Sled with OpenResty XRay

  • The problem: a Sled-based cache service using over 100% CPU
  • Profile the running Rust process with Guided Analysis
  • Read the Rust CPU flame graph: the #1 hottest code path
  • The #2 hottest code path: get_inner and view_for_key
  • Automatic Rust CPU analysis reports
  • Frequently asked questions
  • The problem: a Sled-based cache service using over 100% CPU
  • Profile the running Rust process with Guided Analysis
  • Read the Rust CPU flame graph: the #1 hottest code path
  • The #2 hottest code path: get_inner and view_for_key
  • Automatic Rust CPU analysis reports
  • Frequently asked questions

etcd High CPU Usage: Find the Hottest Go Code Paths with Flame Graphs

  • Symptom: etcd consuming over 70% of a CPU core
  • Use OpenResty XRay Guided Analysis to find the hottest Go code paths
  • Automatic etcd CPU monitoring and reports
  • What is OpenResty XRay
  • Symptom: etcd consuming over 70% of a CPU core
  • Use OpenResty XRay Guided Analysis to find the hottest Go code paths
  • Automatic etcd CPU monitoring and reports
  • What is OpenResty XRay

llama.cpp CPU Usage: 400% CPU Traced to ggml Hot Functions

  • Running llama.cpp and Observing 400% CPU Usage
  • Profiling llama.cpp CPU Usage with OpenResty XRay
  • Findings: The Hottest C++ Code Paths
  • What is OpenResty XRay
  • Running llama.cpp and Observing 400% CPU Usage
  • Profiling llama.cpp CPU Usage with OpenResty XRay
  • Findings: The Hottest C++ Code Paths
  • What is OpenResty XRay

Go Off-CPU Analysis: Tracing a Running Process Stuck at 2% CPU to a Blocking Shell Call

  • The symptom: Go service CPU usage stays low under load
  • Running off-CPU analysis on the live Go process with OpenResty XRay
  • Root cause: a blocking shell command at a single source line
  • Automatic analysis and reports
  • The symptom: Go service CPU usage stays low under load
  • Running off-CPU analysis on the live Go process with OpenResty XRay
  • Root cause: a blocking shell command at a single source line
  • Automatic analysis and reports

Python Process Stuck at 8% CPU: Off-CPU Analysis Traces a Blocking subprocess.run Call

  • The symptom: Python process CPU usage stays low under heavy requests
  • Find the blocking Python code paths with OpenResty XRay’s Guided Analysis
  • Automatic analysis and reports in the Insights page
  • FAQ
  • What is OpenResty XRay
  • About The Author
  • The symptom: Python process CPU usage stays low under heavy requests
  • Find the blocking Python code paths with OpenResty XRay’s Guided Analysis
  • Automatic analysis and reports in the Insights page
  • FAQ
  • What is OpenResty XRay
  • About The Author

Lua High CPU Usage: Find the Hottest Lua Code Path in Nginx/OpenResty

  • The symptom: an Nginx worker process using almost 100% CPU
  • Find the hottest Lua code path with Guided Analysis
  • Monitor Lua CPU usage automatically with Insights reports
  • Frequently asked questions
  • The symptom: an Nginx worker process using almost 100% CPU
  • Find the hottest Lua code path with Guided Analysis
  • Monitor Lua CPU usage automatically with Insights reports
  • Frequently asked questions

How to Configure an SNI Proxy in OpenResty Edge: Route TLS by SNI Hostname Without Decryption

  • Create an SNI Proxy stream application
  • Create upstreams and SNI Server Name page rules
  • Add an SNI Proxy port to the gateway partition
  • Test the SNI proxy with curl and a browser
  • Create an SNI Proxy stream application
  • Create upstreams and SNI Server Name page rules
  • Add an SNI Proxy port to the gateway partition
  • Test the SNI proxy with curl and a browser

OpenResty Edge Static Files: Serve Assets from the Gateway with No Back-to-Source

  • Upload static files to the Global Static File storage
  • Create a page rule to serve them directly from the gateway
  • Test exact match, directory prefix, and ignored prefix
  • Upload static files to the Global Static File storage
  • Create a page rule to serve them directly from the gateway
  • Test exact match, directory prefix, and ignored prefix

OpenResty Edge TCP Load Balancing: Proxy TCP Services Without Editing Nginx Config

  • Create a TCP (stream) application in OpenResty Edge
  • Add an upstream and page rule for TCP load balancing
  • Test the TCP proxy by connecting to MySQL through an edge node
  • Frequently asked questions
  • Create a TCP (stream) application in OpenResty Edge
  • Add an upstream and page rule for TCP load balancing
  • Test the TCP proxy by connecting to MySQL through an edge node
  • Frequently asked questions

OpenResty Edge Error Logs: View Application, Global & Gateway Server Logs

  • How to view application error logs in OpenResty Edge
  • Filtering error logs by Request ID, gateway, server, and log level
  • The three types of global error logs (Global, Admin Site, Log Server)
  • How to check the error.log file on gateway and Admin servers
  • How to view application error logs in OpenResty Edge
  • Filtering error logs by Request ID, gateway, server, and log level
  • The three types of global error logs (Global, Admin Site, Log Server)
  • How to check the error.log file on gateway and Admin servers

How to Enable Sticky Cookies in OpenResty Edge (Session Affinity)

  • How sticky cookies keep session affinity in OpenResty Edge
  • Enable sticky cookies for an upstream (server-level)
  • Test that every request hits the same backend
  • Disable sticky cookies and return to round robin
  • Test again and watch traffic spread across backends
  • Frequently asked questions
  • How sticky cookies keep session affinity in OpenResty Edge
  • Enable sticky cookies for an upstream (server-level)
  • Test that every request hits the same backend
  • Disable sticky cookies and return to round robin
  • Test again and watch traffic spread across backends
  • Frequently asked questions

How to Manage Kubernetes Upstreams in OpenResty Edge as Pods Scale

  • How to create and use Kubernetes upstream
    • Create Kubernetes cluster
    • Create Kubernetes upstream
    • Create a page rule that uses Kubernetes upstream
    • Test: scale the pods and watch the upstream auto-update
  • How to create and use Kubernetes upstream
    • Create Kubernetes cluster
    • Create Kubernetes upstream
    • Create a page rule that uses Kubernetes upstream
    • Test: scale the pods and watch the upstream auto-update

How to deploy the on-premises version of OpenResty XRay on Microsoft's Azure cloud

  • Create a subscription and a resource group
  • Create the Azure Kubernetes service
  • Prepare the environment variables
  • Log in to Azure from the command line
  • Create the namespace and secret for Kubernetes
  • Create the Azure Disk
  • Update the configuration file for the persistent volume
  • Update the Kubernetes configuration file
  • Create the persistent volume
  • Deploy the Kubernetes service
  • Configure the application gateway
  • Create a subscription and a resource group
  • Create the Azure Kubernetes service
  • Prepare the environment variables
  • Log in to Azure from the command line
  • Create the namespace and secret for Kubernetes
  • Create the Azure Disk
  • Update the configuration file for the persistent volume
  • Update the Kubernetes configuration file
  • Create the persistent volume
  • Deploy the Kubernetes service
  • Configure the application gateway

OpenResty Edge gRPC Proxy: Distributed Reverse Proxy & Load Balancer with TLS Termination

  • Prepare a sample gRPC server and test it with grpcurl
  • Add the gRPC server as an upstream and enable the gRPC proxy in a page rule
  • Terminate TLS at the gateway and verify the gRPC proxy end to end
  • Prepare a sample gRPC server and test it with grpcurl
  • Add the gRPC server as an upstream and enable the gRPC proxy in a page rule
  • Terminate TLS at the gateway and verify the gRPC proxy end to end

OpenResty Edge WAF: Enable, Test, and Block Attacks

  • Enable the WAF for an Application in Log-Only Mode
  • Send a Test Attack and Review the WAF Logs
  • Disable and Re-enable Individual WAF Rules
  • Add a WAF Whitelist to Save CPU Cycles
  • Return 403 on a WAF Hit: Sensitivity and Risk-Score Thresholds
  • Verify the 403 Block in the WAF Logs
  • Create Your Own WAF Rule Set in EdgeLang
  • FAQ: WAF on OpenResty
  • Enable the WAF for an Application in Log-Only Mode
  • Send a Test Attack and Review the WAF Logs
  • Disable and Re-enable Individual WAF Rules
  • Add a WAF Whitelist to Save CPU Cycles
  • Return 403 on a WAF Hit: Sensitivity and Risk-Score Thresholds
  • Verify the 403 Block in the WAF Logs
  • Create Your Own WAF Rule Set in EdgeLang
  • FAQ: WAF on OpenResty
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