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
Copy file name to clipboardExpand all lines: articles/spring-apps/how-to-configure-health-probes-graceful-termination.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,13 @@ Azure Spring Apps offers default health probe rules for every application. This
33
33
34
34
## Prerequisites
35
35
36
-
-[Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension.
36
+
-[Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension. Use the following command to remove previous versions and install the latest extension. If you previously installed the spring-cloud extension, uninstall it to avoid configuration and version mismatches.
37
+
38
+
```azurecli
39
+
az extension remove --name spring
40
+
az extension add --name spring
41
+
az extension remove --name spring-cloud
42
+
```
37
43
38
44
## Configure health probes and graceful termination for applications
39
45
@@ -45,19 +51,19 @@ The following table describes the `terminationGracePeriodSeconds` property, whic
|`terminationGracePeriodSeconds`| The duration in seconds after processes running in the app instance are sent a termination signal before they're forcibly halted. Set this value longer than the expected cleanup time for your process. The value must be a non-negative integer. Setting the grace period to zero stops the app instance immediately via the kill signal, with no opportunity to shut down. If the value is nil, Azure Spring Apps uses the default grace period. The default value is 90 seconds. |
54
+
|`terminationGracePeriodSeconds`| The duration in seconds after processes running in the app instance are sent a termination signal before they're forcibly halted. Set this value longer than the expected cleanup time for your process. The value must be a non-negative integer. Setting the grace period to *0* stops the app instance immediately via the kill signal, with no opportunity to shut down. If the value is *nil*, Azure Spring Apps uses the default grace period. The default value is *90*. |
49
55
50
56
### Health probe properties
51
57
52
58
The following table describes the properties you can use to configure health probes.
|`initialDelaySeconds`| The number of seconds after the app instance has started before probes are initiated. The default value is 0, the minimum value. |
57
-
|`periodSeconds`| The frequency in seconds to perform the probe. The default value is 10. The minimum value is 1. |
58
-
|`timeoutSeconds`| The number of seconds until the probe times out. The default value is 1, the minimum value. |
59
-
|`failureThreshold`| The minimum number of consecutive failures for the probe to be considered failed after having succeeded. The default value is 3. The minimum value is 1. |
60
-
|`successThreshold`| The minimum number of consecutive successes for the probe to be considered successful after having failed. The default value is 1. The value must be 1 for liveness and startup. The minimum value is 1. |
62
+
|`initialDelaySeconds`| The number of seconds after the app instance has started before probes are initiated. The default value is *0*, the minimum value. |
63
+
|`periodSeconds`| The frequency in seconds to perform the probe. The default value is *10*. The minimum value is *1*. |
64
+
|`timeoutSeconds`| The number of seconds until the probe times out. The default value is *1*, the minimum value. |
65
+
|`failureThreshold`| The minimum number of consecutive failures for the probe to be considered failed after having succeeded. The default value is *3*. The minimum value is *1*. |
66
+
|`successThreshold`| The minimum number of consecutive successes for the probe to be considered successful after having failed. The default value is *1*. The value must be *1* for liveness and startup. The minimum value is *1*. |
61
67
62
68
### Probe action properties
63
69
@@ -69,7 +75,7 @@ There are three ways you can check an app instance using a probe. Each probe mus
|`command`| The command to execute inside the app instance. The working directory for the command is the root directory (*/*) in the app instance's file system. Because the command is run using `exec` rather than inside a shell, shell instructions won't work. To use a shell, explicitly call out to the shell. An exit status of 0 is treated as live/healthy, and non-zero is unhealthy. |
87
+
|`command`| The command to execute inside the app instance. The working directory for the command is the root directory (*/*) in the app instance's file system. Because the command is run using `exec` rather than inside a shell, shell instructions won't work. To use a shell, explicitly call out to the shell. An exit status of *0* is treated as live/healthy, and non-zero is unhealthy. |
82
88
83
89
-`TCPSocketAction`
84
90
@@ -100,7 +106,7 @@ Use the following steps to customize your application using Azure portal.
100
106
101
107
:::image type="content" source="media/how-to-configure-health-probes-graceful-termination/probe-config.jpg" lightbox="media/how-to-configure-health-probes-graceful-termination/probe-config.jpg" alt-text="Screenshot of the Azure portal Configuration page showing the Health probes tab.":::
102
108
103
-
1. To set the termination grace period, select **General settings**, and specify a value in the Termination grade period box.
109
+
1. To set the termination grace period, select **General settings**, and specify a value in the **Termination grace period** box.
104
110
105
111
:::image type="content" source="media/how-to-configure-health-probes-graceful-termination/termination-grace-period-config.jpg" lightbox="media/how-to-configure-health-probes-graceful-termination/termination-grace-period-config.jpg" alt-text="Screenshot of the Azure portal Configuration page showing the General settings tab.":::
106
112
@@ -148,7 +154,7 @@ Use the following steps to customize your application using Azure CLI.
148
154
}
149
155
```
150
156
151
-
The following example shows an ``ExecAction` action:
157
+
The following example shows an `ExecAction` action:
152
158
153
159
```json
154
160
"probeAction": {
@@ -242,7 +248,7 @@ This section provides answers to frequently asked questions about using health p
242
248
243
249
*The error message points out which probe is responsible for the provision failure. Make sure that the health probe rules are correct and that the timeout is long enough for the application to be in the running state.*
244
250
245
-
- What's the default probe settings for and existing application?
251
+
- What are the default probe settings for an existing application?
246
252
247
253
*The following example shows the default settings:*
0 commit comments