Skip to content

Commit 9337b14

Browse files
author
pensh
committed
Add cli command to guide customer to configure jvm options
1 parent f42a20c commit 9337b14

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

articles/spring-apps/tools-to-troubleshoot-memory-issues.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ You can find this feature on the Azure portal, as shown in the following screens
8989

9090
For further debugging, you can manually capture heap dumps and thread dumps, and use Java Flight Recorder (JFR). For more information, see [Capture heap dump and thread dump manually and use Java Flight Recorder in Azure Spring Apps](how-to-capture-dumps.md).
9191

92-
Heap dump records the state of the Java heap memory. Thread dump records the stacks of all live threads. These tools are available through the Azure CLI and on the app page of the Azure portal, as shown in the following screenshot.
92+
Heap dump records the state of the Java heap memory. Thread dump records the stacks of all live threads. These tools are available through the [Azure CLI](how-to-capture-dumps.md) and on the app page of the Azure portal, as shown in the following screenshot.
9393

9494
:::image type="content" source="media/tools-to-troubleshoot-memory-issues/capture-dump-location.png" alt-text="Screenshot of Azure portal showing app overview page with Troubleshooting button highlighted." lightbox="media/tools-to-troubleshoot-memory-issues/capture-dump-location.png":::
9595

@@ -99,10 +99,22 @@ You can also use third party tools like [Memory Analyzer](https://www.eclipse.or
9999

100100
Some issues you might identify include [container OOM](how-to-fix-app-restart-issues-caused-by-out-of-memory.md#fix-app-restart-issues-due-to-oom), heap memory that's too large, and abnormal garbage collection. If you identify any of these issues, you may need to configure the maximum memory size in the JVM options. For more information, see the [Important JVM options](concepts-for-java-memory-management.md#important-jvm-options) section of [Java memory management](concepts-for-java-memory-management.md#important-jvm-options).
101101

102-
This feature is available on Azure CLI and on the Azure portal, as shown in the following screenshot:
102+
This feature is available on Azure CLI and on the Azure portal.
103+
104+
### Using portal to update jvm options:
103105

104106
:::image type="content" source="media/tools-to-troubleshoot-memory-issues/maxdirectmemorysize-location.png" alt-text="Screenshot of Azure portal showing app configuration page with JVM options highlighted." lightbox="media/tools-to-troubleshoot-memory-issues/maxdirectmemorysize-location.png":::
105107

108+
### Using azure cli to update jvm options
109+
```azurecli
110+
az spring app update \
111+
--resource-group <resource-group-name> \
112+
--service <Azure-Spring-Apps-instance-name> \
113+
--app <app-name> \
114+
--deployment <deployment-name> \
115+
--jvm-options <-Xms1024m -Xmx1536m> \
116+
```
117+
106118
## See also
107119

108120
- [Java memory management](concepts-for-java-memory-management.md)

0 commit comments

Comments
 (0)