Re: Shutdown Solr

2009-08-19 Thread Lance Norskog
In production systems I have done a three-stage technique. First, use the
container's standard shutdown tool. Tomcat, JBoss, Jetty all have their
own. Then, sleep for maybe 60 seconds. Then do kill, sleep more, then 'kill
-9'.
On Wed, Aug 19, 2009 at 12:21 PM, Fuad Efendi  wrote:

> Thanks... "kill" should be / can be graceful; "kill -9" should kill
> immediately... no any hang, whole point...
>
> http://www.nabble.com/Is-kill--9-safe-or-not--td24866506.html
>
>
>
>
> -Original Message-
> From: ptomb...@gmail.com [mailto:ptomb...@gmail.com] On Behalf Of Paul
> Tomblin
> Sent: August-19-09 2:49 PM
> To: solr-user@lucene.apache.org
>  Subject: Re: Shutdown Solr
>
> On Wed, Aug 19, 2009 at 2:43 PM, Fuad Efendi wrote:
> > Most probably Ctrl-C is graceful for Tomcat, and kill -9 too... Tomcat is
> > smart... I prefer "/etc/init.d/my_tomcat" wrapper around catalina.sh ("su
> > tomcat", /var/lock etc...) - ok then, Graceful Shutdown depends on how
> you
> > started Tomcat.
>
> *No* application is graceful for "kill -9".  The whole point of "kill
> -9" is that it's uncatchable.
>
>
> --
> http://www.linkedin.com/in/paultomblin
>
>
>


-- 
Lance Norskog
goks...@gmail.com


RE: Shutdown Solr

2009-08-19 Thread Fuad Efendi
Thanks... "kill" should be / can be graceful; "kill -9" should kill
immediately... no any hang, whole point...

http://www.nabble.com/Is-kill--9-safe-or-not--td24866506.html




-Original Message-
From: ptomb...@gmail.com [mailto:ptomb...@gmail.com] On Behalf Of Paul
Tomblin
Sent: August-19-09 2:49 PM
To: solr-user@lucene.apache.org
Subject: Re: Shutdown Solr

On Wed, Aug 19, 2009 at 2:43 PM, Fuad Efendi wrote:
> Most probably Ctrl-C is graceful for Tomcat, and kill -9 too... Tomcat is
> smart... I prefer "/etc/init.d/my_tomcat" wrapper around catalina.sh ("su
> tomcat", /var/lock etc...) - ok then, Graceful Shutdown depends on how you
> started Tomcat.

*No* application is graceful for "kill -9".  The whole point of "kill
-9" is that it's uncatchable.


-- 
http://www.linkedin.com/in/paultomblin




Re: Shutdown Solr

2009-08-19 Thread Paul Tomblin
On Wed, Aug 19, 2009 at 2:43 PM, Fuad Efendi wrote:
> Most probably Ctrl-C is graceful for Tomcat, and kill -9 too... Tomcat is
> smart... I prefer "/etc/init.d/my_tomcat" wrapper around catalina.sh ("su
> tomcat", /var/lock etc...) - ok then, Graceful Shutdown depends on how you
> started Tomcat.

*No* application is graceful for "kill -9".  The whole point of "kill
-9" is that it's uncatchable.


-- 
http://www.linkedin.com/in/paultomblin


RE: Shutdown Solr

2009-08-19 Thread Fuad Efendi
Most probably Ctrl-C is graceful for Tomcat, and kill -9 too... Tomcat is
smart... I prefer "/etc/init.d/my_tomcat" wrapper around catalina.sh ("su
tomcat", /var/lock etc...) - ok then, Graceful Shutdown depends on how you
started Tomcat.




RE: Shutdown Solr

2009-08-19 Thread Fuad Efendi
SolrDispatchFilter has it:

  public void destroy() {
if (cores != null) {
  cores.shutdown();
  cores = null;
}
  }


It should gracefully shutdown all background threads (used by Lucene
index-merge etc)


Tomcat: catalina.sh stop, shutdown.sh, etc.; 

Ctrl-C is not graceful



-Original Message-
From: Fuad Efendi [mailto:f...@efendi.ca] 
Sent: August-19-09 1:53 PM
To: solr-user@lucene.apache.org
Subject: RE: Shutdown Solr

catalina.sh stop


But SolrServlet catches everything and forgets to implement destroy()!

I am absolutely unsure about Ctrl-C and even have many concerns regarding
catalina.sh stop... J2EE/JEE does not specify any support for threads
outside than container-managed... 

I hope SolrServlet closes Lucene index (and other resources) and everything
follows Servlet specs... but I can't find dummies' method _"destroy()"_ in
SolrServlet!!! It shold gracefully close Lucene index and other resources.

WHY?


-Original Message-
From: Tobias Brennecke [mailto:t.bu...@gmail.com] 
Sent: August-19-09 11:39 AM
To: solr-user@lucene.apache.org
Subject: Re: Shutdown Solr

it catches the kill signal and shuts down as it should, I guess :) because
it writes stuff to the log after pressing ^c

2009/8/19 Miller, Michael P. 

> Does anyone know a graceful way to shutdown Solr?  (other than killing
> the process with Ctrl-C)
>






RE: Shutdown Solr

2009-08-19 Thread Fuad Efendi
catalina.sh stop


But SolrServlet catches everything and forgets to implement destroy()!

I am absolutely unsure about Ctrl-C and even have many concerns regarding
catalina.sh stop... J2EE/JEE does not specify any support for threads
outside than container-managed... 

I hope SolrServlet closes Lucene index (and other resources) and everything
follows Servlet specs... but I can't find dummies' method _"destroy()"_ in
SolrServlet!!! It shold gracefully close Lucene index and other resources.

WHY?


-Original Message-
From: Tobias Brennecke [mailto:t.bu...@gmail.com] 
Sent: August-19-09 11:39 AM
To: solr-user@lucene.apache.org
Subject: Re: Shutdown Solr

it catches the kill signal and shuts down as it should, I guess :) because
it writes stuff to the log after pressing ^c

2009/8/19 Miller, Michael P. 

> Does anyone know a graceful way to shutdown Solr?  (other than killing
> the process with Ctrl-C)
>




Re: Shutdown Solr

2009-08-19 Thread Tobias Brennecke
it catches the kill signal and shuts down as it should, I guess :) because
it writes stuff to the log after pressing ^c

2009/8/19 Miller, Michael P. 

> Does anyone know a graceful way to shutdown Solr?  (other than killing
> the process with Ctrl-C)
>