You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.
This article describes various concepts related to Java memory management to help you understand the behavior of Java applications hosted in Azure Spring Apps.
21
21
@@ -27,7 +27,7 @@ A Java application's memory has several parts, and there are different ways to d
27
27
28
28
Heap memory stores all class instances and arrays. Each Java virtual machine (JVM) has only one heap area, which is shared among threads.
29
29
30
-
Spring Boot Actuator can observe the value of heap memory. Spring Boot Actuator takes the heap value as part of `jvm.memory.used/committed/max`. For more information, see the [jvm.memory.used/committed/max](tools-to-troubleshoot-memory-issues.md#jvmmemoryusedcommittedmax) section in [Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md).
30
+
Spring Boot Actuator can observe the value of heap memory. Spring Boot Actuator takes the heap value as part of `jvm.memory.used/committed/max`. For more information, see the [jvm.memory.used/committed/max](../enterprise/tools-to-troubleshoot-memory-issues.md#jvmmemoryusedcommittedmax) section in [Tools to troubleshoot memory issues](../enterprise/tools-to-troubleshoot-memory-issues.md).
31
31
32
32
Heap memory is divided into *young generation* and *old generation*. These terms are described in the following list, along with related terms.
33
33
@@ -72,7 +72,7 @@ Full GC or major GC does garbage collection in the entire heap. Full GC can also
72
72
73
73
The maximum heap size influences the frequency of minor GC and full GC. The maximum metaspace and maximum direct memory size influence full GC.
74
74
75
-
When you set the maximum heap size to a lower value, garbage collections occur more frequently, which slow the app a little, but better limits the memory usage. When you set the maximum heap size to a higher value, garbage collections occur less frequently, which may create more out-of-memory (OOM) risk. For more information, see the [Types of out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md#types-of-out-of-memory-issues) section of [App restart issues caused by out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
75
+
When you set the maximum heap size to a lower value, garbage collections occur more frequently, which slow the app a little, but better limits the memory usage. When you set the maximum heap size to a higher value, garbage collections occur less frequently, which may create more out-of-memory (OOM) risk. For more information, see the [Types of out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md#types-of-out-of-memory-issues) section of [App restart issues caused by out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
76
76
77
77
Metaspace and direct memory can be collected only by full GC. When metaspace or direct memory is full, full GC will occur.
78
78
@@ -86,7 +86,7 @@ Applications in Azure Spring Apps run in container environments. For more inform
86
86
87
87
### Important JVM options
88
88
89
-
You can configure the maximum size of each part of memory by using JVM options. You can set JVM options by using Azure CLI commands or through the Azure portal. For more information, see the [Modify configurations to fix problems](tools-to-troubleshoot-memory-issues.md#modify-configurations-to-fix-problems) section of [Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md).
89
+
You can configure the maximum size of each part of memory by using JVM options. You can set JVM options by using Azure CLI commands or through the Azure portal. For more information, see the [Modify configurations to fix problems](../enterprise/tools-to-troubleshoot-memory-issues.md#modify-configurations-to-fix-problems) section of [Tools to troubleshoot memory issues](../enterprise/tools-to-troubleshoot-memory-issues.md).
90
90
91
91
The following list describes the JVM options:
92
92
@@ -156,9 +156,9 @@ Overall, when configuring maximum memory sizes, you should consider the usage of
156
156
157
157
## Java OOM
158
158
159
-
OOM means the application is out of memory. There are two different concepts: container OOM and JVM OOM. For more information, see [App restart issues caused by out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
159
+
OOM means the application is out of memory. There are two different concepts: container OOM and JVM OOM. For more information, see [App restart issues caused by out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md).
160
160
161
161
## See also
162
162
163
-
-[App restart issues caused by out-of-memory issues](how-to-fix-app-restart-issues-caused-by-out-of-memory.md)
164
-
-[Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md)
163
+
-[App restart issues caused by out-of-memory issues](../enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md)
164
+
-[Tools to troubleshoot memory issues](../enterprise/tools-to-troubleshoot-memory-issues.md)
Copy file name to clipboardExpand all lines: articles/spring-apps/enterprise/how-to-fix-app-restart-issues-caused-by-out-of-memory.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The **Resource health** page on the Azure portal shows app restart events due to
43
43
44
44
The metrics *App memory Usage*, `jvm.memory.used`, and `jvm.memory.committed` provide a view of memory usage. For more information, see the [Metrics](tools-to-troubleshoot-memory-issues.md#metrics) section of [Tools to troubleshoot memory issues](tools-to-troubleshoot-memory-issues.md). Configure the maximum memory sizes in JVM options to ensure that memory is under the limit.
45
45
46
-
The sum of the maximum memory sizes of all the parts in the [Java memory model](concepts-for-java-memory-management.md#java-memory-model) should be less than the real available app memory. To set your maximum memory sizes, see the typical memory layout described in the [Memory usage layout](concepts-for-java-memory-management.md#memory-usage-layout) section of [Java memory management](concepts-for-java-memory-management.md).
46
+
The sum of the maximum memory sizes of all the parts in the [Java memory model](../basic-standard/concepts-for-java-memory-management.md#java-memory-model) should be less than the real available app memory. To set your maximum memory sizes, see the typical memory layout described in the [Memory usage layout](../basic-standard/concepts-for-java-memory-management.md#memory-usage-layout) section of [Java memory management](../basic-standard/concepts-for-java-memory-management.md).
47
47
48
48
Find a balance when you set the maximum memory size. When you set the maximum memory size too high, there's a risk of container OOM. When you set the maximum memory size too low, there's a risk of JVM OOM, and garbage collection will be of and will slow down the app.
49
49
@@ -70,5 +70,5 @@ Metaspace memory is usually stable.
0 commit comments