On 11/10/2015 7:40 AM, Steven White wrote: > This question maybe more of a Linux one vs. Solr, but I have to start > someplace. > > I'm reading this link > https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production > to get Solr on Linux (I'm more of a Windows guy). > > The page provides good intro on how to setup Solr to start as a service on > Linux. Now what I don't get is this: what happens when the system is > shutting down? How does Solr knows to shutdown gracefully when there is > noting on that page talks about issuing a "stop" command on system > shutdown? Can someone shed some light on this? Like I said, I'm more of a > "Windows" guy.
This definitely applies more to Linux than Solr. Understanding the answer requires understanding basic Linux system design and administration. Linux systems use something, usually sysvinit, systemd, or upstart, to manage service startup and shutdown. I will not go into detail, but one of the things that these programs do is manage services via symlinks into the /etc/init.d structure -- starting them at boot time and shutting them down when the OS is shutting down. When you use the Solr installer script, you get a script in /etc/init.d and symlinks for startup and shutdown, so the system has the ability to ask Solr to turn itself off. If programs do not shut themselves down fast enough at shutdown time, the operating system will attempt to hard kill them before it shuts itself off ... but even if they don't die, Linux can still forcibly halt itself and turn off the power. Thanks, Shawn