Spring boot slow starttup

This is a strange problem.

We are using spring boot web app with embedded tomcat.

On my local mac, the application launch is fast .. a few seconds. On a google machine with Centos 7 it starts very slowly .. about 2 minutes.

Application is written in JAVA 8

Can anyone please help?

+3


source to share


2 answers


This community wiki answer

is provided by @AndyWilkinson

Are you using Tomcat? It could be the lack of entropy causing it to block. See Spring Boot Actuator Application Won't Run on Ubuntu VPS for more details.



and @leozin :

Try to install haveged

:sudo apt-get install haveged -y

+4


source


I agree that it haveged

improves startup times.



In my case (also in Centos 7, but docker in container) I had to add some -XX: MaxMetaspaceSize and the startup time went down after about 2 minutes.

0


source







All Articles