|
1
|
import { Note, Table } from "docs-ui" |
|
2
|
|
|
3
|
export const metadata = { |
|
4
|
title: `Environment Performance Monitoring`, |
|
5
|
} |
|
6
|
|
|
7
|
# {metadata.title} |
|
8
|
|
|
9
|
In this guide, you'll learn how to monitor your environment's performance in Cloud. |
|
10
|
|
|
11
|
## Monitoring Overview |
|
12
|
|
|
13
|
Medusa allows you to monitor the performance of your deployed [environment](../environments/page.mdx)'s backend in Cloud. |
|
14
|
|
|
15
|
By monitoring key metrics, you can ensure that your environment is running smoothly, identify potential performance bottlenecks, and troubleshoot issues effectively. |
|
16
|
|
|
17
|
You can monitor metrics like: |
|
18
|
|
|
19
|
- [Servers](./servers/page.mdx): Monitor CPU usage, memory consumption, and restarts of your environment's server instances. |
|
20
|
- [Workers](./workers/page.mdx): Monitor CPU usage, memory consumption, and restarts of your environment's worker instances, which handle background jobs. |
|
21
|
- [HTTP](./http/page.mdx): Monitor HTTP request patterns, response times, and HTTP-related performance data. |
|
22
|
|
|
23
|
--- |
|
24
|
|
|
25
|
## Access Environment Monitoring |
|
26
|
|
|
27
|
To view your project environment's server performance: |
|
28
|
|
|
29
|
1. Go to your [environment's dashboard](../environments/long-lived/page.mdx#open-environment-dashboard) |
|
30
|
2. Click **Monitoring** in the sidebar. This will expand a submenu where you can choose either **Servers**, **Workers**, or **HTTP** to view the corresponding monitoring dashboard. |
|
31
|
|
|
32
|
--- |
|
33
|
|
|
34
|
## Troubleshooting Performance Issues |
|
35
|
|
|
36
|
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. |
|
37
|
|
|
38
|
<Table> |
|
39
|
<Table.Header> |
|
40
|
<Table.Row> |
|
41
|
<Table.HeaderCell> |
|
42
|
Issue |
|
43
|
</Table.HeaderCell> |
|
44
|
<Table.HeaderCell> |
|
45
|
Potential Cause |
|
46
|
</Table.HeaderCell> |
|
47
|
<Table.HeaderCell> |
|
48
|
Monitoring Dashboard |
|
49
|
</Table.HeaderCell> |
|
50
|
</Table.Row> |
|
51
|
</Table.Header> |
|
52
|
<Table.Body> |
|
53
|
<Table.Row> |
|
54
|
<Table.Cell> |
|
55
|
Slow response times |
|
56
|
</Table.Cell> |
|
57
|
<Table.Cell> |
|
58
|
High CPU or memory usage in server instances due to inefficient code. |
|
59
|
</Table.Cell> |
|
60
|
<Table.Cell> |
|
61
|
[Servers](./servers/page.mdx) |
|
62
|
</Table.Cell> |
|
63
|
</Table.Row> |
|
64
|
<Table.Row> |
|
65
|
<Table.Cell> |
|
66
|
Increased error rates |
|
67
|
</Table.Cell> |
|
68
|
<Table.Cell> |
|
69
|
Endpoints with crashes or timeouts due to inefficient code. |
|
70
|
</Table.Cell> |
|
71
|
<Table.Cell> |
|
72
|
[HTTP](./http/page.mdx) |
|
73
|
</Table.Cell> |
|
74
|
</Table.Row> |
|
75
|
<Table.Row> |
|
76
|
<Table.Cell> |
|
77
|
High latency in HTTP requests |
|
78
|
</Table.Cell> |
|
79
|
<Table.Cell> |
|
80
|
Inefficient database queries or external API calls in specific endpoints. |
|
81
|
</Table.Cell> |
|
82
|
<Table.Cell> |
|
83
|
[HTTP](./http/page.mdx) |
|
84
|
</Table.Cell> |
|
85
|
</Table.Row> |
|
86
|
<Table.Row> |
|
87
|
<Table.Cell> |
|
88
|
Background jobs not executing or slow execution |
|
89
|
</Table.Cell> |
|
90
|
<Table.Cell> |
|
91
|
High CPU or memory usage in worker instances due to inefficient background job implementation. |
|
92
|
</Table.Cell> |
|
93
|
<Table.Cell> |
|
94
|
[Workers](./workers/page.mdx) |
|
95
|
</Table.Cell> |
|
96
|
</Table.Row> |
|
97
|
<Table.Row> |
|
98
|
<Table.Cell> |
|
99
|
Frequent worker or server restarts |
|
100
|
</Table.Cell> |
|
101
|
<Table.Cell> |
|
102
|
Crashes due to memory leaks or unhandled exceptions in your application code. |
|
103
|
</Table.Cell> |
|
104
|
<Table.Cell> |
|
105
|
[Workers](./workers/page.mdx) and [Servers](./servers/page.mdx) |
|
106
|
</Table.Cell> |
|
107
|
</Table.Row> |
|
108
|
<Table.Row> |
|
109
|
<Table.Cell> |
|
110
|
High [Flex Usage](../usage/page.mdx#what-is-flex-usage) |
|
111
|
</Table.Cell> |
|
112
|
<Table.Cell> |
|
113
|
High resource consumption in servers or workers due to inefficient code. |
|
114
|
</Table.Cell> |
|
115
|
<Table.Cell> |
|
116
|
[Workers](./workers/page.mdx) and [Servers](./servers/page.mdx) |
|
117
|
</Table.Cell> |
|
118
|
</Table.Row> |
|
119
|
</Table.Body> |
|
120
|
</Table> |
|
121
|
|
|
122
|
<Note> |
|
123
|
|
|
124
|
If the monitoring dashboards don't show a cause related to your application, [check the Cloud status page](../status/page.mdx) for ongoing Cloud incidents that may be affecting your environment. |
|
125
|
|
|
126
|
</Note> |