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! --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
