Spring Boot应用程序需要30-45分钟才能入门

时间:2019-05-09 07:37:38

标签: java spring-boot

大约6个月前,我已经在生产中的Linux服务器上部署了独立的jar。它在大约几秒钟内开始。 但是,当我在同一台服务器上部署一个新建的jar时。开始大约需要30-45分钟。

由于这个原因,我无法在现有设置上进行任何更改。

我试图在同一台服务器上启动Hello World春季启动应用程序。入门也需要2分钟。

Hello World应用日志:

[support@kbla180303 ~]$ java -jar /app/kpam/kpam-test.jar
Inside Main

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.4.RELEASE)

2019-05-09 13:26:42.606  INFO 1656 --- [           main] com.kmbl.kpam.KpamTest1Application       : Starting KpamTest1Application v0.0.1-SNAPSHOT on kbla180303 with PID 1656 (/app/kpam/kpam-test.jar started by support in /home/support)
2019-05-09 13:26:43.110  INFO 1656 --- [           main] com.kmbl.kpam.KpamTest1Application       : No active profile set, falling back to default profiles: default
2019-05-09 13:26:50.058  INFO 1656 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@531d72ca: startup date [Thu May 09 13:26:50 IST 2019]; root of context hierarchy
2019-05-09 13:27:52.515  INFO 1656 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-05-09 13:27:53.905  INFO 1656 --- [           main] com.kmbl.kpam.KpamTest1Application       : Started KpamTest1Application in 122.87 seconds (JVM running for 164.207)
Exit Main
2019-05-09 13:27:53.907  INFO 1656 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@531d72ca: startup date [Thu May 09 13:26:50 IST 2019]; root of context hierarchy
2019-05-09 13:27:53.910  INFO 1656 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

1 个答案:

答案 0 :(得分:0)

我已将Spring Boot版本从1.5.4.RELEASE更新到2.1.4.RELEASE。现在应用程序将在几秒钟内启动。 但仍未找到此问题的根本原因。