lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <>
Subject Re: SolrJ 6.6.0 Connection pool shutdown
Date Thu, 29 Jun 2017 13:37:56 GMT
One thing to check is whether there is a firewall between the client
and the server. They - sometimes - cut the silent connections in the
_middle_ (at the firewall). The usual solution is keepAlive request of
some kind or not using the connection pool.

One way to check is with network tracer like Wireshark and checking
whether the actual hardware at the other end of the connection is a
normal server or some sort of unexpected hardware piece of equipment
(firewall). Yes, that's using the hammer to swat a fly :-)

---- - Resources for Solr users, new and experienced

On 29 June 2017 at 08:21, Markus Jelsma <> wrote:
> Hi,
> Everything is 6.6.0. I could include a stack trace (i don't print them in my program),
but that would only be the the trace from getById() to CloudSolrClient.requestWithRetryOnStaleState()
and little deeper, that what you're looking for?
> We haven't called close() in that particular part of the program.
> Method requestWithRetryOnStaleState has some retry logic built-in but doesn't seem to
work for the exception i got.
> I'll let it print the stack trace and get back if it happens again.
> Thanks,
> Markus
> -----Original message-----
>> From:Shawn Heisey <>
>> Sent: Tuesday 27th June 2017 23:02
>> To:
>> Subject: Re: SolrJ 6.6.0 Connection pool shutdown
>> 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

View raw message