Redirect the output to the file when starting java, java xxx >> logfile 2>&1; echo $? >> logfile. In addition, sometimes java exits coredump, ulimit -c opens core.
In this case, the program usually crashes, so it cannot be seen in the log.
But you will see the hs_err_pid.log file in the directory where the calling program is running, which contains the jvm information and stack information when it crashed, which can help you analyze the cause of the crash.
Redirect the output to the file when starting java, java xxx >> logfile 2>&1; echo $? >> logfile. In addition, sometimes java exits coredump, ulimit -c opens core.
In this case, the program usually crashes, so it cannot be seen in the log.
But you will see the hs_err_pid.log file in the directory where the calling program is running, which contains the jvm information and stack information when it crashed, which can help you analyze the cause of the crash.
Sometimes a JNI error will kill the entire process. This depends on experience. .
Is there a request log? You can see what the last request was before exiting. Do some more stress testing to see if it crashes.
sudo dmesg -T | grep "(java)"
You’re welcome~