When stopping via systemd only kill the JVM, not its control group (#25195)

This prevents possible race conditions between the Elasticsearch JVM and
plugin native controller processes that can cause the Elasticsearch shutdown
to hang.  The problem can happen when the JVM and the controller process
receive a SIGTERM at almost the same time.

(There's an assumption here that Elasticsearch will continue to use other
mechanisms to kill native controller processes.)
This commit is contained in:
David Roberts 2017-06-14 09:23:41 +01:00 committed by GitHub
parent e333955557
commit a5658c0fea
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ TimeoutStopSec=0
# SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM
# Send the signal only to the JVM rather than its control group
KillMode=process
# Java process is never killed
SendSIGKILL=no