Hi Oleg, I checked the provided pull request, and I think it is fine.
Thank you. Best regards, Angel ________________________________ From: Oleg Kalnichevski <[email protected]> Sent: Saturday, January 17, 2026 4:26 PM To: HttpClient User Discussion <[email protected]> Subject: Re: Request for enhancement of Apache HTTP Client debug logs On Tue, 2026-01-13 at 14:49 +0100, Oleg Kalnichevski wrote: > > > On 01/13/2026 14:11, Vardin. Angel wrote: > > Hello, > > Thank you for the provided information. My implementation contains > > logic that cleans expired connections every 10 seconds. To verify > > the correct timeout value, I checked the default logic in the > > HttpClientBuilder, which cleans both expired and idle connections. > > As far as I can see, this is implemented in the > > IdleConnectionEvictor thread (see links below): > > https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/impl/IdleConnectionEvictor.java#L56 > > > > https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java#L1118 > > You mentioned in your response that the timeout for expited > > connections cleaning should not be less than one minute. However, > > in the IdleConnectionEvictor, the default timeout is 5 seconds if > > no value is specified. Additionally, if evictIdleConnections is not > > configured, the timeout defaults seems to be 1 second. > > We had extreme cases with people trying to call the damn method every > few milliseconds. A safe-guard has been introduced to ensure the > sleep > interval could not be less than a second. The patch had a bug in it > that > I had overlooked. The default should have never been 1 sec. > > In the normal course of operations when the pool is reasonably busy > it > will evict expired connections as it encounters them. The idle > evictor > thread is needed only if there _long_ periods of inactivity. One > minute > sweep should be perfectly sufficient, Or 30 seconds. Anything below 5 > seconds is outright crazy but we still allow it in case someone > really > has reasons for that. > > I will address the problem with IdleConnectionEvictor defaults, but > there unlikely to be changes to the logging granularity. > Hi Angel Please see the proposed fix https://github.com/apache/httpcomponents-client/pull/789 Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] SEEBURGER AG Vorstand/SEEBURGER Executive Board: Sitz der Gesellschaft/Registered Office: Axel Haas, Michael Kleeberg, Dr. Martin Kuntz, Matthias Fe?enbecker Edisonstr. 1 D-75015 Bretten Vorsitzende des Aufsichtsrats/Chairperson of the SEEBURGER Supervisory Board: Tel.: 07252 / 96 - 0 Prof. Dr. Simone Zeuchner-Egli Fax: 07252 / 96 - 2222 Internet: http://www.seeburger.de Registergericht/Commercial Register: e-mail: [email protected] HRB 240708 Mannheim Dieses E-Mail ist nur f?r den Empf?nger bestimmt, an den es gerichtet ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungs?u?erung ist die des Autors und stellt nicht notwendigerweise die Ansicht oder Meinung der SEEBURGER AG dar. Sind Sie nicht der Empf?nger, so haben Sie diese E-Mail irrt?mlich erhalten und jegliche Verwendung, Ver?ffentlichung, Weiterleitung, Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt. Weder die SEEBURGER AG noch der Absender (Vardin. Angel) ?bernehmen die Haftung f?r Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren Anh?nge auf Viren zu pr?fen. This email is intended only for the recipient(s) to whom it is addressed. This email may contain confidential material that may be protected by professional secrecy. Any fact or opinion contained, or expression of the material herein, does not necessarily reflect that of SEEBURGER AG. If you are not the addressee or if you have received this email in error, any use, publication or distribution including forwarding, copying or printing is strictly prohibited. Neither SEEBURGER AG, nor the sender (Vardin. Angel) accept liability for viruses; it is your responsibility to check this email and its attachments for viruses.
