Skip to main content

How can I troubleshoot and resolve CPU usage spikes and server load issues in Umbraco Cloud?

Written by Joana Knobbe

How to Troubleshoot and Resolve CPU Usage Spikes and Server Load Issues in Umbraco Cloud

CPU usage spikes and server load issues can significantly impact the performance and availability of your Umbraco Cloud site. This guide provides a comprehensive approach to identifying and resolving these issues, including common causes, investigative steps, immediate actions, long-term solutions, and preventive measures.

Common Causes of CPU Usage Spikes

  1. High Traffic or Bot Traffic: - Automated bot traffic can generate millions of requests, exhausting CPU resources and causing downtime. Traffic analysis tools like Cloudflare can help identify bot-originated traffic through signals like JA3/JA4 fingerprints and low bot scores.

  2. Shared Hosting Resource Contention: - On shared hosting plans, CPU and memory are shared across all apps. High resource usage by other sites can lead to 100% CPU utilization, causing performance degradation and downtime.

  3. Complex Web Pages and High Request Volume: - Complex pages with multiple elements (e.g., images, scripts, stylesheets) can generate a high number of requests, increasing server load.

  4. Application-Level Issues: - Activities such as indexing, startup processes, or DevOps operations can cause temporary CPU spikes.

  5. Upgrades and Resource Limits: - CPU spikes during upgrades can max out app service plan resources, especially if other sites on the same plan are also consuming high CPU.

Investigative Steps

  1. Review Resource Metrics: - Use tools like Azure CPU graphs to identify spike times and correlate them with application logs.

  2. Analyze Logs: - Investigate logs for patterns such as traffic surges, scheduled tasks, or repeated hits to inaccessible URLs.

  3. Traffic Analysis: - Use tools like Cloudflare to analyze traffic sources and identify potential bot activity.

Immediate Actions

  1. Restart Environments: - Restart affected environments (Dev, Live, Staging) to stabilize the site.

  2. Upgrade Hosting Plan: - Temporarily upgrade to a higher-tier plan to provide more resources and reduce contention.

  3. Implement Security Measures: - Set up Web Application Firewall (WAF) rules to block hostile traffic and reduce unwanted requests.

Long-Term Solutions

  1. Move to Dedicated Hosting: - Transition to a dedicated hosting environment to ensure exclusive resource allocation and avoid competition from other sites.

  2. Optimize Application Configuration: - Adjust settings such as Models Builder to reduce runtime overhead and streamline background processes.

  3. Reduce Startup Load: - Implement lazy loading and defer non-critical initializations to minimize CPU usage during startup.

Preventive Measures

  1. Monitor Resource Usage: - Regularly review resource metrics and logs to identify potential issues before they escalate.

  2. Strengthen Security: - Use tools like Cloudflare to monitor and block malicious traffic.

  3. Plan for Traffic Spikes: - Anticipate high traffic periods and ensure adequate resources are available to handle the load.

By following these steps, you can effectively troubleshoot and resolve CPU usage spikes and server load issues in your Umbraco Cloud environment, ensuring optimal performance and stability.

Did this answer your question?