-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
aspnetcore/release-notes/aspnetcore-9/includes/fix-for-503s.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
### Fix for 503's during app recycle in IIS | ||
|
||
By default there is now a 1 second delay between when IIS is notified of a recycle or shutdown and when ANCM tells the managed server to start shutting down. The delay is configurable via the `ANCM_shutdownDelay` environment variable or by setting the `shutdownDelay` handler setting. Both values are in milliseconds. The delay is mainly to reduce the likelihood of a race where: | ||
|
||
* IIS hasn't started queuing requests to go to the new app. | ||
* ANCM starts rejecting new requests that come into the old app. | ||
|
||
Slower machines or machines with heavier CPU usage may want to adjust this value to reduce 503 likelihood. | ||
|
||
Example of setting `shutdownDelay`: | ||
|
||
```xml | ||
<aspNetCore processPath="dotnet" arguments="myapp.dll" stdoutLogEnabled="false" stdoutLogFile=".logsstdout"> | ||
<handlerSettings> | ||
<!-- Milliseconds to delay shutdown by. | ||
this doesn't mean incoming requests will be delayed by this amount, | ||
but the old app instance will start shutting down after this timeout occurs --> | ||
<handlerSetting name="shutdownDelay" value="5000" /> | ||
</handlerSettings> | ||
</aspNetCore> | ||
``` | ||
|
||
The fix is in the globally installed ANCM module that comes from the hosting bundle. |