jira-importer opened a new issue, #1249: URL: https://github.com/apache/httpcomponents-core/issues/1249
**[qxo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=qxo)** opened **[HTTPCORE-735](https://issues.apache.org/jira/browse/HTTPCORE-735?redirect=false)** and commented Why shutdown Connection pool if has a Error ? This is very unreasonable, one application shares the same httpclient, and a problem with one call will make the entire application unusable. Not robust enough!!! demo code: https://github.com/qxo/httpclient-shutdown-demo/blob/main/src/main/java/demo/HttpClientStackOverflowErrorShutdownDemo.java ```java 21:54:21.921 [main] INFO d.HttpClientStackOverflowErrorShutdownDemo - ==============================>invokeCount1: 1330 21:54:21.921 [main] ERROR d.HttpClientStackOverflowErrorShutdownDemo - java.lang.StackOverflowError 21:54:21.921 [main] INFO d.HttpClientStackOverflowErrorShutdownDemo - ==============================>invokeCount2: 1330 Exception in thread "main" java.lang.IllegalStateException: Connection pool shut down at org.apache.http.util.Asserts.check(Asserts.java:34) at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:191) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:267) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at demo.HttpClientStackOverflowErrorShutdownDemo.doGet(HttpClientStackOverflowErrorShutdownDemo.java:80) at demo.HttpClientStackOverflowErrorShutdownDemo.doLoopGet(HttpClientStackOverflowErrorShutdownDemo.java:65) at demo.HttpClientStackOverflowErrorShutdownDemo.main(HttpClientStackOverflowErrorShutdownDemo.java:51) ``` --- **Issue Links:** - [HTTPCLIENT-1924](https://issues.apache.org/jira/browse/HTTPCLIENT-1924) connection leak issue when OutOfMemory (_**"is caused by"**_) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
