Handling Memory and CPU Errors in Web Apps
Memory and CPU errors are common in production web applications, especially as usage grows or if your app leaks resources over time. This guide helps you identify, troubleshoot, and resolve such issues on your Web App.
Signs of Trouble
Memory (Out-of-Memory - OOM)
Out-of-memory issues are one of the most frequent causes of application crashes. You might see logs like:
"Container terminated due to OOM (out-of-memory). Details: https://help.galaxycloud.app/en/article/handling-memory-and-cpu-errors-in-web-apps-efa31b"
This message indicates that your application tried to consume more memory than the allocated limit. When this happens, the container is automatically terminated and restarted.
Symptoms of memory issues include:
- Frequent restarts
- High memory usage spikes (e.g., reaching 90% or more)
- Sluggish performance over time
- Crashes under load or during specific tasks
⚠️ Note: Even if you don’t see a memory spike in the metrics dashboard, your app may still crash before the metrics can catch it.
Scaling Resources: Upgrade Your Plan
If your Web App consistently exceeds memory or CPU limits, you may need to upgrade the plan type. Higher plans offer increased resource limits per container, which can help reduce crashes and improve performance.
How to Upgrade:
- Go to your webapp overview page.
- Click the Upgrade App button.
- Select a higher-tier plan (e.g., from Nano to 2XLarge).
- Save and deploy changes.
🟢 Changes take effect immediately after redeploying your application.
Need Help?
If you’re unsure whether a memory or CPU issue is the cause, or need help selecting the right plan:
Contact our support team.
We’re here to help analyze your metrics, review logs, and recommend the right course of action.
Updated on: 21/07/2025