spring boot 启动慢 [英] Spring boot slow starttup

查看:49
本文介绍了spring boot 启动慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个奇怪的问题.

我们正在使用带有集成 tomcat 的 Spring Boot Web 应用程序.

We are using spring boot web application with integrated tomcat.

在我的本地 mac 上,应用程序启动很快……几秒钟.在装有 Centos 7 的谷歌机器上,它启动很慢.. 大约 2 分钟.

On my local mac, the app startup quickly.. several seconds. On google machine with Centos 7, it starts very slowly.. about 2 minutes.

应用程序是用 JAVA 8 编写的

Application is written in JAVA 8

有人可以帮忙吗?

推荐答案

这是一个 community wiki answer,由 @AndyWilkinson

您在使用 Tomcat 吗?可能是熵的缺乏导致它块.请参阅 Spring Boot Actuator 应用程序无法启动Ubuntu VPS 了解更多详情.

Are you using Tomcat? It could be a lack of entropy causing it to block. See Spring Boot Actuator application won't start on Ubuntu VPS for more details.

@leozin:

尝试安装 haveged:sudo apt-get install haveged -y

这篇关于spring boot 启动慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆