-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to improve random connection errors in CI (#871)
This adds a Maven settings.xml file which contains the necessary settings to lower the TTL for connections in the connection pool used by Maven to download artifacts. This is to work around an issue where Azure would silently terminate connections that have been idle for more than 4 minutes causing weird aborts in GitHub
- Loading branch information
Showing
2 changed files
with
31 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
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,29 @@ | ||
<settings> | ||
<profiles> | ||
<profile> | ||
<id>stackable</id> | ||
<properties> | ||
<!-- | ||
This is to work around an issue where Maven builds in Github Actions would randomly fail. | ||
There is some evidence that points at Azure networking as the root cause where it closes idle connections (silently) after 4 minutes. | ||
Maven would then sometimes reuse an "old" connection from its connection pool and would encounter issues due to these connection closures. | ||
This patch changes the TTL for the connections to a lower value than 4 minutes (240s), the default is 300s (5min). | ||
There are two properties here because sometimes in November 2023 the name was changed. | ||
The new name will only take effect as of Maven 4, but it doesn't hurt to add it here already, therefore, we just add both properties here. | ||
https://issues.apache.org/jira/browse/MRESOLVER-440 | ||
--> | ||
|
||
<!-- Old name: maven-resolver 1.x, Maven 3.x --> | ||
<aether.connector.http.connectionMaxTtl>30</aether.connector.http.connectionMaxTtl> | ||
|
||
<!-- New name: maven-resolver 2.x, as of Maven 4.x --> | ||
<aether.transport.http.connectionMaxTtl>30</aether.transport.http.connectionMaxTtl> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
<activeProfiles> | ||
<!--make the stackable profile active all the time --> | ||
<activeProfile>stackable</activeProfile> | ||
</activeProfiles> | ||
</settings> |