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 abhishek jain <ab...@gmail.com> on 2014/04/08 21:28:07 UTC

Stopping Solr instance

Hi friends,

What is the best way to stop solr from command line, the command with the
stop port and secret key as given in most online help links don't work for
me all time, 

I have to kill it most times ! i have though noted excessive swap usage when
i have to kill it. Is there a link between swap usage and solr not stopping?

 

Please let me know best way to stop solr instance.

 

Thanks

Abhi 

 

 


Re: Stopping Solr instance

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi,

How do you start solr? 



On Tuesday, April 8, 2014 10:31 PM, abhishek jain <ab...@gmail.com> wrote:
Hi friends,

What is the best way to stop solr from command line, the command with the
stop port and secret key as given in most online help links don't work for
me all time, 

I have to kill it most times ! i have though noted excessive swap usage when
i have to kill it. Is there a link between swap usage and solr not stopping?



Please let me know best way to stop solr instance.



Thanks

Abhi 

Re: Stopping Solr instance

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/8/2014 1:28 PM, abhishek jain wrote:
> What is the best way to stop solr from command line, the command with the
> stop port and secret key as given in most online help links don't work for
> me all time,
>
> I have to kill it most times ! i have though noted excessive swap usage when
> i have to kill it. Is there a link between swap usage and solr not stopping?

My init script first tries the jetty port/key stop method that you 
mentioned, then tries to gracefully kill by PID and by Solr listening 
port.  If none of that works in a reasonable timeframe, it will do kill 
-9.  Here's my redhat-specific init script, which may require adaptation 
for others to use:

http://wiki.apache.org/solr/ShawnHeisey#Init_script

If the system is swapping, that will make everything extremely slow.  A 
graceful shutdown would likely take minutes instead of seconds, so a 
hard kill might be required.Swapping should be avoided at all costs.

Java programs (like Solr) have strict limits on how much memory they're 
allowed to consume.  If Solr is the only program on the machine, then 
swapping should only be possible if the Java heap is higher than (or 
very close to) the available RAM on the machine.

There is one possible situation where swapping can happen even when 
there is no memory pressure.  This happens when the machine has a NUMA 
architecture, two (or more) physical CPUs, and you are requesting a very 
large amount of RAM on the machine for your application:

http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/

If you are running into this swap insanity problem, you may need to 
utilize numa tools to start Solr.  I will say that allocating more than 
half of the RAM in a machine to Solr is likely to be a bad choice, 
because that doesn't leave much for the OS disk cache.  The OS disk 
cache is a very important part of Solr performance.

Thanks,
Shawn