hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject HttpClient behavior on close with active connections
Date Wed, 09 Nov 2016 20:43:14 GMT
I'm using SolrJ 6.2.1 in the program I'm writing, which pulls in
httpclient/httpmime 4.5.2 and httpcore 4.4.5 as dependencies.

One of the things that my SolrJ code does takes over an hour to
complete.  The HTTP connection is kept open for all that time.  I'd like
to find a way for the Solr server to respond immediately and continue
the operation in the background, but currently there doesn't seem to be
a way to do that.

Now I am attempting to make it possible to gracefully shut down
everything related to what my code does, turn everything into garbage,
reload the configuration, and build it all back up.  Therefore I need to
know how certain things behave at close/shutdown, assuming everything is
not idle.

What happens to a long-lived HTTP connection if another thread calls
close() on the HttpClient?  Does the connection immediately die and
throw an exception, or would the connection finish as expected in its
own time?  If the connection remains open until completion, does the
close() call return immediately, or wait until that connection ends,
whether successful or not?  Are all object references (threads in
particular) properly released and turned into garbage?  I tried to
follow the code, but got lost quickly.  If it's documented somewhere,
please point me at that documentation.


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

View raw message