Server Monitoring

In this guide, you'll learn how to monitor your environment's server performance in Cloud.

Note: The Servers monitoring page covers the CPU and memory usage of your environment's server instances, as well as their restart patterns. To monitor background job performance, check the Workers monitoring page.

Server Metrics Overview#

The Servers monitoring page provides real-time insights into your servers' performance.

By monitoring these metrics, you can ensure that your environment is running smoothly, identify potential performance bottlenecks, and troubleshoot issues effectively.

You can monitor key metrics such as:

  • CPU Usage: Track how much of your allocated CPU resources are being used.
  • Memory Usage: Monitor memory consumption patterns across your server instances.
  • Restarts: Keep an eye on server restart frequency and patterns.

Troubleshooting Common Server Issues#

The following table outlines common server performance issues, their potential causes, and the specific metrics you can monitor to identify and troubleshoot these issues effectively.

Issue

Potential Cause

Metric to Check

Slow response times

CPU usage consistently near or exceeding allocation due to inefficient code.

Total CPU and Summary of CPU Usage Across Servers

Application crashes or unexpected behavior

Insufficient memory allocation or memory leaks in your application code.

Summary of Memory Usage Across Servers

Frequent server restarts

Crashes caused by unhandled exceptions or out-of-memory conditions.

Server Restarts and Summary of Memory Usage Across Servers

Uneven load distribution across instances

Specific server instances handling disproportionately more traffic than others.

Summary of CPU Usage Across Servers and Summary of Memory Usage Across Servers

High Flex Usage

Excessive CPU or memory consumption in server instances due to inefficient code.

Total CPU and Summary of Memory Usage Across Servers


View Server Metrics#

To view your project environment's server performance:

  1. In the environment's dashboard, click on the "Monitoring" tab.
  2. Select "Servers" from the sidebar.

This opens the Servers monitoring dashboard, where you can analyze your environment's server performance across any time range.

Change Time Range#

By default, the dashboard shows metrics for the last hour. To change the time range:

  1. Click on the time range selector at the top right of the dashboard.
  2. Either choose a preset time range (for example, last 24 hours) or set a custom time range.

The charts will update to show metrics for the selected time range, allowing you to analyze performance trends and patterns over different periods.

Refresh Metrics#

To refresh the metrics displayed on the dashboard, click the button.

The metrics will refresh to show the most up-to-date performance data for your environment's servers in the selected time range.


Monitor Total CPU#

The Total CPU usage of your environment shows combined CPU allocation and usage across all server replicas of your environment. It's useful to understand your overall CPU resource consumption and identify trends or spikes in usage.

In the Servers monitoring dashboard, the Total CPU chart shows:

  • Allocated CPU (blue): The total CPU resources allocated to your servers.
  • Used CPU (green): The actual CPU resources being consumed by your application.

If your environment is slow or unresponsive, check if the Used CPU is consistently close to or exceeding the Allocated CPU, which may indicate the need for performance improvements in your application.


Monitor Summary of CPU Usage Across Servers#

The Summary of CPU usage across servers of your environment shows CPU usage patterns across individual server instances.

In the Servers monitoring dashboard, the Per-Server CPU chart shows:

  • Minimum CPU: The lowest CPU percentage used by a server instance at a given time.
  • Maximum CPU: The highest CPU percentage used by a server instance at a given time.
  • Average CPU: The mean CPU usage across all server instances at a given time.

This breakdown helps you identify peaks in CPU usage across your server instances and determine if specific instances are under heavy load or if CPU usage is evenly distributed across your infrastructure.


Monitor Summary of Memory Usage Across Servers#

The Summary of Memory usage across servers of your environment shows memory consumption patterns across individual server instances.

In the Servers monitoring dashboard, the Summary of Memory chart shows:

  • Minimum Memory: The lowest memory percentage used across instances at a given time.
  • Maximum Memory: The highest memory percentage used across instances at a given time.
  • Average Memory: The mean memory usage across all instances at a given time.

This breakdown helps you identify if specific server instances are consuming excessive memory or if memory usage is consistent across your infrastructure.


Monitor Server Restarts#

The Server Restarts section helps you track the frequency and patterns of unexpected server restarts in your environment. Frequent or unexpected restarts can indicate underlying issues with your application, such as crashes and memory leaks.

In the Servers monitoring dashboard, the Server Restarts chart shows the number of restarts across your server instances over time.

You can also correlate restart patterns with CPU and memory usage to identify potential causes of instability in your environment.

Was this guide helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Medusa MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break