Re: Stopping Solr JVM on OOM

2016-03-19 Thread xavi jmlucjav
In order to force a OOM do this: - index a sizable amount of docs with normal -Xmx, if you already have 350k docs indexed, that should be enough - now, stop solr and decrease memory, like -Xmx=15m, start it, and run a query with a facet on a field with very high cardinality, ask for all facets.

Re: Stopping Solr JVM on OOM

2016-03-19 Thread Binoy Dalal
Hi Shawn, Your thoughts on this? On Mon, Mar 14, 2016 at 2:11 PM Binoy Dalal wrote: > I set the heap to 16 mb and tried to index about 350k records using a DIH. > This did throw an OOM for that particular thread in the console, but the > oom script wasn't called and solr

Re: Stopping Solr JVM on OOM

2016-03-14 Thread Binoy Dalal
I set the heap to 16 mb and tried to index about 350k records using a DIH. This did throw an OOM for that particular thread in the console, but the oom script wasn't called and solr was running properly. Moreover, solr also managed to index all 350k records. Is this the correct way to o about

Re: Stopping Solr JVM on OOM

2016-03-13 Thread Shawn Heisey
On 3/13/2016 8:13 PM, Binoy Dalal wrote: > I made the necessary changes to that oom script? > How does it look now? > Also can you suggest some way of testing it with solr? > How do I make solr oom on purpose? Set the java heap really small. Not entirely sure what value to use. I'd probably

Re: Stopping Solr JVM on OOM

2016-03-13 Thread Binoy Dalal
Hello Shawn, I made the necessary changes to that oom script? How does it look now? Also can you suggest some way of testing it with solr? How do I make solr oom on purpose? Thanks On Wed, 9 Mar 2016, 19:11 Shawn Heisey, wrote: > On 3/9/2016 6:07 AM, Binoy Dalal wrote: > >

Re: Stopping Solr JVM on OOM

2016-03-09 Thread Shawn Heisey
On 3/9/2016 6:07 AM, Binoy Dalal wrote: > Have you had a chance to check and review the patch? I have not. I will look at it sometime today, probably later this evening (UTC-7 timezone). Thanks, Shawn

Re: Stopping Solr JVM on OOM

2016-03-09 Thread Binoy Dalal
Hi Shawn, Have you had a chance to check and review the patch? On Wed, 9 Mar 2016, 00:49 Binoy Dalal, wrote: > I've uploaded both files. > Please review and advise. > > On Wed, Mar 9, 2016 at 12:46 AM Binoy Dalal > wrote: > >> Hi Shawn, >> The

Re: Stopping Solr JVM on OOM

2016-03-08 Thread Binoy Dalal
I've uploaded both files. Please review and advise. On Wed, Mar 9, 2016 at 12:46 AM Binoy Dalal wrote: > Hi Shawn, > The JIRA issue is SOLR-8803 ( > https://issues.apache.org/jira/browse/SOLR-8803). > I've used "git diff" and created a patch but it only has the changes

Re: Stopping Solr JVM on OOM

2016-03-08 Thread Binoy Dalal
Hi Shawn, The JIRA issue is SOLR-8803 (https://issues.apache.org/jira/browse/SOLR-8803 ). I've used "git diff" and created a patch but it only has the changes that I made to the solr.cmd file under bin to add the -XX:OnOutOfMemoryError option. There's the entire file of the actual OOM kill script

Re: Stopping Solr JVM on OOM

2016-03-08 Thread Shawn Heisey
On 3/8/2016 5:13 AM, Binoy Dalal wrote: > I've just finished writing a batch oom killer script and it seems to work > fine. > > I couldn't try it on the actual solr process since I'm a bit stumped on how > I can make solr throw an oom at will. > Although I did write another code that does throw an

Re: Stopping Solr JVM on OOM

2016-03-08 Thread Binoy Dalal
Hi Shawn, I've just finished writing a batch oom killer script and it seems to work fine. I couldn't try it on the actual solr process since I'm a bit stumped on how I can make solr throw an oom at will. Although I did write another code that does throw an oom upon which this script is called and

Re: Stopping Solr JVM on OOM

2016-03-07 Thread Shawn Heisey
On 2/25/2016 2:06 PM, Fuad Efendi wrote: > The best practice: do not ever try to catch Throwable or its descendants > Error, VirtualMachineError, OutOfMemoryError, and etc. > > Never ever. > > Also, do not swallow InterruptedException in a loop. > > Few simple rules to avoid hanging application.

Re: Stopping Solr JVM on OOM

2016-03-07 Thread Muhammad Zahid Iqbal
You can use ping functionality by setting time-out that suits for your container/web-apps. If its not working then you can restart your container. Cheers! If any other solution I am interested too. On Fri, Feb 26, 2016 at 2:19 AM, CP Mishra wrote: > Solr & Lucene dev folks

Re: Stopping Solr JVM on OOM

2016-02-25 Thread CP Mishra
Solr & Lucene dev folks must be catching Throwable for a reason. Anyway, I am asking for solutions that I can use. On Thu, Feb 25, 2016 at 3:06 PM, Fuad Efendi wrote: > The best practice: do not ever try to catch Throwable or its descendants > Error, VirtualMachineError,

Re: Stopping Solr JVM on OOM

2016-02-25 Thread Fuad Efendi
The best practice: do not ever try to catch Throwable or its descendants Error, VirtualMachineError, OutOfMemoryError, and etc.  Never ever. Also, do not swallow InterruptedException in a loop. Few simple rules to avoid hanging application. If we follow these, there will be no question "what

Stopping Solr JVM on OOM

2016-02-25 Thread CP Mishra
Looking at the previous threads (and in our tests), oom script specified at command line does not work as OOM exception is trapped and converted to RuntimeException. So, what is the best way to stop Solr when it gets in OOM state? The only way I see is to override multiple handlers and do