lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Help with Lucene Indexer crash recovery
Date Fri, 05 Oct 2007 23:19:39 GMT

: Once in a while we kill the running application using "kill -9". I

To quote a great man, who frequently quotes another great man: "Well 
there's your problem!"

stop using "kill -9" ... i'll say it again because it's important, and 
i'm even going to violate etiquite and use all caps because it's *that* 

	STOP USING KILL -9's an abhorent practice that too many people make a habit of. SIGKILL 
(the signal sent when you run "kill -9") is ment to be a last resort only 
if you can't get a rogue process to stop by any other means.  Instead of 
using kill -9, add some sort of notification mechanism to your application 
so you can trigger graceful shutdowns, or at the very least just use 
"kill" (no -9) so that the process (the JVM) can at least exit on it's own 
and do basic buffer flushing and file handle closing.

: I don't have any shutdown hook right now, but I'm thinking of adding
: one for graceful index closing.  We use following merge parameters,

When you use SIGKILL the process has no idea it's about to die ... it is 
given no notice, it is wiped off the face of the earth in one blinding 
atomic action -- so a shutdown hook isn't going to do you any good if you 
keep using kill -9.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message