You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Markus Jelsma <ma...@openindex.io> on 2017/06/27 12:50:19 UTC

SolrJ 6.6.0 Connection pool shutdown

Hi,

We have a proces checking presence of many documents in a collection, just a simple client.getById(id). It sometimes begins throwing lots of  these exceptions in a row:

org.apache.solr.client.solrj.SolrServerException: java.lang.IllegalStateException: Connection pool shut down

Then, as suddenly as it appeared, it's gone again a no longer a problem. I would expect SolrJ not to throw this but to wait until it the connection pool, or whatever mechanism is there, to recover.

Did i miss a magic parameter for SolrJ?

Thanks,
Markus

Re: SolrJ 6.6.0 Connection pool shutdown

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/27/2017 6:50 AM, Markus Jelsma wrote:
> We have a proces checking presence of many documents in a collection, just a simple client.getById(id). It sometimes begins throwing lots of  these exceptions in a row:
>
> org.apache.solr.client.solrj.SolrServerException: java.lang.IllegalStateException: Connection pool shut down
>
> Then, as suddenly as it appeared, it's gone again a no longer a problem. I would expect SolrJ not to throw this but to wait until it the connection pool, or whatever mechanism is there, to recover.
>
> Did i miss a magic parameter for SolrJ?\

That error message will be much longer than what you've provided here. 
It will have a java stacktrace that's typically a dozen or so lines
long.  There may also be one or more "Caused by" sections after the
stacktrace, each with a stacktrace of its own.  Can you share the full
error message?  Is the server also running 6.6.0, or a different version?

It would also be helpful if you can share the SolrJ code you've written,
cleanly redacted to remove anything sensitive.

That particular message ("Connection pool shut down") sounds like it
probably came from HttpClient, which SolrJ uses ... and I would expect
that to only happen if you close/shutdown the HttpClient or the
SolrClient.  After closing, a client can't be used any more.  Normally
the only time you should close a client is right before exiting the
program, although if the program's about to exit, it's generally
unnecessary, so in my opinion for *most* usages, closing the client
likely never needs to happen.

Thanks,
Shawn