You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Shawn Heisey <ap...@elyograg.org> on 2017/07/18 12:46:08 UTC

Can the connection pool be shut down in any way other than explicitly closing?

I have a user on the solr-user mailing list who is running into an
exception from HttpClient:

Caused by: 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:184)
at
org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:217)
at
org.apache.http.impl.conn.PoolingClientConnectionManager.requestConnection(PoolingClientConnectionManager.java:184)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:515)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:279)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:268)
at
org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:447)
... 24 more

They are using a SolrJ object called CloudSolrClient.  This in turn uses
LBHttpSolrClient, which uses HttpSolrClient, and inside THAT class,
HttpClient is used.

What I'd like to know is whether the connection pool can ever be shut
down *without* explicitly calling close/shutdown ... by some kind of
error, perhaps.  I suspect that they are calling an explicit action to
shut down either the solr client or the HttpClient, but I don't want to
say that before I ask whether it can happen any other way.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Can the connection pool be shut down in any way other than explicitly closing?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2017-07-18 at 06:46 -0600, Shawn Heisey wrote:
> I have a user on the solr-user mailing list who is running into an
> exception from HttpClient:
> 
> 

...

> They are using a SolrJ object called CloudSolrClient.  This in turn
> uses
> LBHttpSolrClient, which uses HttpSolrClient, and inside THAT class,
> HttpClient is used.
> 
> What I'd like to know is whether the connection pool can ever be shut
> down *without* explicitly calling close/shutdown ... by some kind of
> error, perhaps.  I suspect that they are calling an explicit action
> to
> shut down either the solr client or the HttpClient, but I don't want
> to
> say that before I ask whether it can happen any other way.
> 
> Thanks,
> Shawn
> 

Hi Shawn 

The #isShutDown flag can be set to true inside #shutdown method only as
far as I can tell.

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org