spring-boot version: 2.3.1.RELEASE

run spring batch job by springboot systemd service which produced by gradle , after first gc , the application shutdown sliencely , but if I use java -jar command run the bootJar dose't have this problem.

systemd config file:

JAVA_OPTS=-verbose:gc -Xmx512M -XX:ErrorFile=/var/archives/hs_err_pid_%p.log -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/var/archives/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/archives -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 LOG_FOLDER=/var/archives

hs_err_pid_.log does't generated , and the gc.log does't generated too

Comment From: wilkinsona

Thanks for the report.

Unfortunately, it's not clear to me how you have identified that the process is shutting down when garbage collection first occurs or why you think that Spring Boot is causing this to happen. Spring Boot's launch script doesn't configure the process to shut down on first GC and, as far as I know, there isn't even an option to configure the JVM to do so.

If you would like us to spend some time investigating, we'll need some more information to help us to understand why you believe that this is a problem with Spring Boot or its launch script. A minimal sample that reproduces the behaviour that you have described would be ideal.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.