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 Shawn Heisey <so...@elyograg.org> on 2012/03/16 00:53:57 UTC
StreamingUpdateSolrServer - thread exit timeout?
I've got a build system that uses SolrJ. The currently running version
uses CommonsHttpSolrServer for everything. In the name of performance,
I am writing a new version that uses CommonsHttpSolrServer for queries
and StreamingUpdateSolr for updates.
One of the things that my program does is handle termination signals
gracefully, with a static boolean value called runFlag that tells it
that it should no longer be running. Each of my threads watches that
value and exits gracefully when runFlag is false. This works perfectly
fine if I use CHSS for everything, but when I use SUSS, it takes exactly
60 seconds for the program to close.
Is there any way to get get the threads within SUSS objects to
immediately exit without creating other issues? Alternatively, if
immediate isn't possible, the exit could take 1-2 seconds. I could not
find any kind of method in the API that closes down the object.
Thanks,
Shawn
Re: StreamingUpdateSolrServer - thread exit timeout?
Posted by Shawn Heisey <so...@elyograg.org>.
On 3/20/2012 8:11 PM, Chris Hostetter wrote:
> :> Is there any way to get get the threads within SUSS objects to immediately
> :> exit without creating other issues? Alternatively, if immediate isn't
> :> possible, the exit could take 1-2 seconds. I could not find any kind of
> :> method in the API that closes down the object.
>
> you should take al ook at this thread...
>
> http://www.lucidimagination.com/search/document/53dc7e3d2102bb51
I've got this in a standalone application with a main(), started from
the commandline. When I close it and it calls the shutdown hook, there
is nothing from SolrJ logged to my log4j destination, stdout, or
stderr. I'm using SolrJ 3.5.0.
Is the memory leak you have mentioned still something I need to worry about?
Thanks,
Shawn
Re: StreamingUpdateSolrServer - thread exit timeout?
Posted by Chris Hostetter <ho...@fucit.org>.
: > Is there any way to get get the threads within SUSS objects to immediately
: > exit without creating other issues? Alternatively, if immediate isn't
: > possible, the exit could take 1-2 seconds. I could not find any kind of
: > method in the API that closes down the object.
you should take al ook at this thread...
http://www.lucidimagination.com/search/document/53dc7e3d2102bb51
-Hoss
Re: StreamingUpdateSolrServer - thread exit timeout?
Posted by Shawn Heisey <so...@elyograg.org>.
On 3/15/2012 5:53 PM, Shawn Heisey wrote:
> Is there any way to get get the threads within SUSS objects to
> immediately exit without creating other issues? Alternatively, if
> immediate isn't possible, the exit could take 1-2 seconds. I could
> not find any kind of method in the API that closes down the object.
I've worked this out by getting rid of the SignalHandler stuff and
implementing a shutdown hook. Now I am only waiting for specific
threads to exit, not all threads running in the VM. A couple of
bonuses: 1) No more compiler warnings. 2) Now I have a final message in
the logfile saying the program is terminated.
Thanks,
Shawn