Skip to content

Commit 38714fb

Browse files
Merge pull request #209009 from SteveSaunders1952/v-ssaunders-sunkun99
Troubleshoot exit codes editorial pass
2 parents d987417 + 4292011 commit 38714fb

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

articles/spring-apps/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ items:
266266
href: how-to-self-diagnose-solve.md
267267
- name: Self diagnose running in VNET
268268
href: how-to-self-diagnose-running-in-vnet.md
269-
- name: Troubleshooting guide
269+
- name: Troubleshoot common issues
270270
href: troubleshoot.md
271+
- name: Troubleshoot common exit code issues
272+
href: troubleshoot-exit-code.md
271273
- name: Capture heap/thread dump and use JFR
272274
href: how-to-capture-dumps.md
273275
- name: Use JVM options for troubleshooting
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Troubleshoot common exit code issues in Azure Spring Apps
3+
description: Describes how to troubleshoot common exit codes in Azure Spring Apps
4+
author: KarlErickson
5+
ms.service: spring-apps
6+
ms.topic: troubleshooting
7+
ms.date: 08/24/2022
8+
ms.author: kunsun
9+
---
10+
11+
# Troubleshoot common exit code issues in Azure Spring Apps
12+
13+
> [!NOTE]
14+
> 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.
15+
16+
**This article applies to:** ✔️ Basic/Standard tier ✔️ Enterprise tier
17+
18+
This article describes troubleshooting actions you can take when your application in Azure Spring Apps exits with an error code. You may receive an error code if your application deployment is unsuccessful, or if the application exits when it's running.
19+
20+
## Exit codes
21+
22+
The exit code indicates the reason the application terminated. The following list describes some common exit codes:
23+
24+
- **0** - The application exited because it ran to completion. Update your server application so that it runs continuously.
25+
26+
Deployed Azure apps in Azure Spring Apps should offer services continuously. An exit code of *0* indicates that the application isn't running continuously. Check your logs and source code.
27+
28+
- **1** - If the application exits with a non-zero exit code, debug the code and related services, and then deploy the application again.
29+
30+
Consider the following possible causes of a non-zero exit code:
31+
32+
- There's something wrong with your Spring Boot configuration.
33+
34+
For example, you need a *spring.db.url* parameter to connect to the database, but it's not found in your configuration file.
35+
36+
- You're disconnected from a third-party service.
37+
38+
For example, you need to connect to a Redis service, but the service isn't working or available.
39+
40+
- You don't have sufficient access to a third-party service.
41+
42+
For example, you need to connect to Azure Key Vault to import certificates in your application, but your application doesn't have the necessary permissions to access it.
43+
44+
- **137** - The application exited because of an out-of-memory error. The application requested resources that the hosting platform failed to provide. Update your application's Java Virtual Machine (JVM) parameters to restrict resource usage or scale up application resources.
45+
46+
If the application is a Java application, check the JVM parameter values. They may exceed the memory limit of your application.
47+
48+
For example, suppose you set the *Xmx* JVM parameter to 10 GB, but the application is using up to 5 GB of memory. Decrease the *Xmx* value or increase the application memory to make sure that the value of the *Xmx* parameter is lower or equal to the memory limit of the application.
49+
50+
- **143** - The application exited because it failed to respond to a health check due to an out-of-memory error or some other error.
51+
52+
This error code is most often generated by an out-of-memory error. 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).
53+
54+
You can also find more information from the application log by using the Azure CLI [az spring app logs](/cli/azure/spring/app#az-spring-app-logs) command.
55+
56+
## Next steps
57+
58+
- [Troubleshoot common Azure Spring Apps issues](./troubleshoot.md)

articles/spring-apps/troubleshoot.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,4 @@ Enterprise tier has built-in VMware Spring Runtime Support, so you can open supp
283283
## Next steps
284284

285285
* [How to self-diagnose and solve problems in Azure Spring Apps](./how-to-self-diagnose-solve.md)
286+
* [Troubleshoot common exit code issues in Azure Spring Apps](./troubleshoot-exit-code.md)

0 commit comments

Comments
 (0)