On Sat, 2026-02-21 at 10:55 +0000, Dario Novakovic via httpclient-users wrote: > I use PoolingHttpClientConnectionManager 5.5.2 with Springboot 4.0.2. > > All is well until I noticed 'wire' logger logs "[read] I/O error: > Read timed out". There are no other symptoms, REST calls are just > fine. > But I would like to figure it out, what is the cause? Would it be > problematic once the project goes live? > > Server sets keep-alive header to 20. > > Here is my config > > Timeout timeout = Timeout.ofSeconds(10); > > ConnectionConfig connConfig = ConnectionConfig.custom() > .setConnectTimeout(timeout) > .setSocketTimeout(timeout) > .build(); > > PoolingHttpClientConnectionManager connMgr = new > PoolingHttpClientConnectionManager(); > connMgr.setDefaultConnectionConfig(connConfig); > connMgr.setMaxTotal(10); > connMgr.setDefaultMaxPerRoute(5); > > RequestConfig reqConfig = RequestConfig.custom() > .setConnectionRequestTimeout(timeout) > .setResponseTimeout(timeout) > .build(); > > HttpClient httpClient = HttpClientBuilder.create() > .setDefaultRequestConfig(reqConfig) > .setConnectionManager(connMgr) > .evictExpiredConnections() > .evictIdleConnections(Timeout.ofMinutes(2)) > .build(); > > HttpComponentsClientHttpRequestFactory reqFactory = new > HttpComponentsClientHttpRequestFactory(); > reqFactory.setHttpClient(httpClient); > > > > If I set > connConfig.setValidateAfterInactivity(Timeout.ofSeconds(20)) > > error message goes away. But I don't understand the entire context > and what affects what. > > Can anyone please help with the "wire" logging "[read] I/O error: > Read timed out"? Is it harmful? What is the cause? > > Thanks! >
The log basically states there has been a socket timeout on a read operation and as far as I understand it has been automatically recovered from. If you run your application with the context / wire log on as described here [1] I should be able to give you a more precise answer. Oleg [1] https://hc.apache.org/httpcomponents-client-5.6.x/logging.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
