[ 
https://issues.apache.org/jira/browse/HTTPCORE-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17693582#comment-17693582
 ] 

qxo edited comment on HTTPCORE-735 at 2/26/23 4:24 AM:
-------------------------------------------------------

[~olegk]  : 

In other words, the httpclient connection pool may be closed unexpectedly and 
unrecoverable, and the application can only be restarted?

If it's ture, then the httpclient API implementation is not robust enough!

My demo shows that if the httpclient connection pool is not closed, it can be 
restored!

 
{color:#000000}java.lang.OutOfMemoryError/{color}StackOverflowError are thread 
ref issue, can be recovery!


was (Author: qxo):
[~olegk]  : 

In other words, the httpclient connection pool may be closed unexpectedly and 
unrecoverable, and the application can only be restarted?

If it's ture, then the httpclient API implementation is not robust enough!

My demo shows that if the httpclient connection pool is not closed, it can be 
restored!

> "Connection pool shut down" unreasonable
> ----------------------------------------
>
>                 Key: HTTPCORE-735
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-735
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: qxo
>            Priority: Major
>
> 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
> {code: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)
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to