On Thu, 2025-05-29 at 22:54 -0700, Ryan Schmitt wrote:
> It's the `autoClose` setting. It used to be `true`:
> 
> https://github.com/apache/httpcomponents-client/blob/d8f702fb4d44c746bb0edf00643aa7139cb8bdf7/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java#L274
> 
> Now it's `false`:
> 
> https://github.com/apache/httpcomponents-client/blob/ffe4a05f4faf3706a41ff660bcb3474c6b5101a3/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java#L208
> 
> This was deliberately changed in this commit:
> 
> https://github.com/apache/httpcomponents-client/commit/ee0a102104d03a8d1cfe18e571d179c41242182c
> 

This change was introduced in response to HTTPCLIENT-2328 [1]. I will
review the code for accidental mistakes. Conceptually the `autoClose`
setting should be merely a convenience.

Oleg


[1] https://issues.apache.org/jira/browse/HTTPCLIENT-2328



> On Thu, May 29, 2025 at 6:08 PM Ryan Schmitt <rschm...@apache.org>
> wrote:
> > 
> > I've been debugging a load test regression, which turned out to be
> > caused by a client instance leak. The test started failing on 5.4.4
> > due to running out of file descriptors. What I realized is that
> > leaked
> > connection pools are eventually cleaned up by garbage collection,
> > which causes the sockets' file descriptors to be released. What has
> > changed in 5.4.4 is that this process now takes TWO rounds of
> > garbage
> > collection. This can be seen in the `lsof` output, which shows
> > where
> > in the TCP state machine the socket is:
> > 
> > 5.2: ESTABLISHED -(gc)-> (gone)
> > 5.4: ESTABLISHED -(gc)-> CLOSE_WAIT -(gc)-> (gone)
> > 
> > Does anyone know what might have changed that would cause this? I'm
> > specifically asking about the synchronous client (I haven't tested
> > the
> > async client).
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
> For additional commands, e-mail: dev-h...@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to