[ 
https://issues.apache.org/jira/browse/MRESOLVER-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744668#comment-17744668
 ] 

Konrad Windszus commented on MRESOLVER-385:
-------------------------------------------

As in fact reducing the the total TTL of connection in the pool to 300 fixed 
the situation with ASF Jenkins Windows nodes (and it seems that stale 
connections are not always detected by the stale connection check). Some of the 
proxies/NATs seem to just cut the connection after 300 seconds, therefore the 
list above doesn't seem relevant in the context of most "Connection reset" 
issues. However, keeping HTTP Native in sync with Wagon (i.e. set it to 300) 
seems reasonable.

> Reduce default value for aether.connector.http.connectionMaxTtl
> ---------------------------------------------------------------
>
>                 Key: MRESOLVER-385
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-385
>             Project: Maven Resolver
>          Issue Type: Improvement
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Due to issues with "Connection reset" (outlined in MRESOLVER-383) as first 
> measure the default value of {{aether.connector.http.connectionMaxTtl}} 
> should be reduced from 600 (the default value used in Wagon is 300).
> Some references for connection idle timeouts of common proxies (towards the 
> client):
> * The default idle timeout is 4 minutes = 240 seconds for *Azure 
> Loadbalancers* 
> (https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-idle-timeout?tabs=tcp-reset-idle-portal)
> * The default idle timeout is for *AWS ALBs* is 60 seconds 
> (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#connection-idle-timeout)
> * For *Fastly CDN* the default idle timeout for clients is 10 
> seconds(https://www.fastly.com/blog/reusing-backend-connections-increase-performance#keep-alive-timeouts)
> So the current default of 600 seconds seem too high. The questions is to what 
> it should be reduced to given that the connection is currently anyhow 
> revalidated before use after being idle for 2 seconds or longer:
> {quote}
> The code now only checks the connection if the elapsed time since the last 
> use of the connection exceeds the timeout that has been set. The default 
> timeout is set to 2000ms
> {quote}
> (https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to