Environment Performance Monitoring
In this guide, you'll learn how to monitor your environment's performance in Cloud.
Monitoring Overview#
Medusa allows you to monitor the performance of your deployed environment's backend in Cloud.
By monitoring key metrics, you can ensure that your environment is running smoothly, identify potential performance bottlenecks, and troubleshoot issues effectively.
You can monitor metrics like:
- Servers: Monitor CPU usage, memory consumption, and restarts of your environment's server instances.
- Workers: Monitor CPU usage, memory consumption, and restarts of your environment's worker instances, which handle background jobs.
- HTTP: Monitor HTTP request patterns, response times, and HTTP-related performance data.
Access Environment Monitoring#
To view your project environment's server performance:
- Go to your environment's dashboard
- Click on the "Monitoring" tab.
This opens the monitoring dashboard, where you can select the specific metrics you want to view from the sidebar.
Troubleshooting Performance Issues#
If you notice performance issues in your environment, such as slow response times or increased error rates, use the monitoring dashboards to identify potential causes.
Issue | Potential Cause | Monitoring Dashboard |
|---|---|---|
Slow response times | High CPU or memory usage in server instances due to inefficient code. | |
Increased error rates | Endpoints with crashes or timeouts due to inefficient code. | |
High latency in HTTP requests | Inefficient database queries or external API calls in specific endpoints. | |
Background jobs not executing or slow execution | High CPU or memory usage in worker instances due to inefficient background job implementation. | |
Frequent worker or server restarts | Crashes due to memory leaks or unhandled exceptions in your application code. | |
High Flex Usage | High resource consumption in servers or workers due to inefficient code. |