Search before asking
Fluss version
0.8.0 (latest release)
Please describe the bug 🐞
If the server's shutdown hook does not complete within 10 seconds, the service will be forced to kill. The reason is that the fluss-daemon.sh set a 10-second timeout before forcibly killing the entire service:
function guaranteed_kill {
to_stop_pid=$1
daemon=$2
# send sigterm for graceful shutdown
kill $to_stop_pid
# if timeout exists, use it
if command -v timeout &> /dev/null ; then
# wait 10 seconds for process to stop. By default, Fluss kills the JVM 5 seconds after sigterm.
timeout 10 tail --pid=$to_stop_pid -f /dev/null &> /dev/null
if [ "$?" -eq 124 ]; then
echo "Daemon $daemon didn't stop within 10 seconds. Killing it."
# send sigkill
kill -9 $to_stop_pid
fi
fi
}
Solution
No response
Are you willing to submit a PR?