tomcat加载java程序非常慢解决
2024-09-05 05:43:38
解决:
下面两种方式都要添加上,速度会很快,启动妙级的
1)在Tomcat环境中解决
可以通过配置JRE使用非阻塞的Entropy Source。
在catalina.sh中加入这么一行:
JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
即可。
加入后再启动Tomcat,整个启动耗时迅速下降。
2)在JVM环境中解决
find / -name java.security
打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:
securerandom.source=file:/dev/urandom
替换成
securerandom.source=file:/dev/./urandom
实例:
[root@host-10-1-1-103 tomcat]# find / -name java.security
[root@host-10-1-1-103 bin]# find / -name java.security
/usr/local/jdk/jre/lib/security/java.security
/usr/local/jdk/jdk1.8.0_171/jre/lib/security/java.security
3、mysql数据看的max_connection 连接数调大即可解决调到1000
最新文章
- VB常用字符串操作函数
- Web API--自定义异常结果的处理
- oracle RAC切换归档
- Oracle Error - ";OCIEnvCreate failed with return code -1 but error message text was not available";.
- Unity3D 的摄像机
- max texture size of ios device
- 修改idea的运行内存
- js prototype之诡异
- Excel导入到DataTable
- MyEclipse2015上传项目到GitHub(很详细)
- python操作mongodb
- Dynamics 365-OnPremise V9 安装系统要求
- Web前端开发推荐书籍
- DMA及cache一致性的学习心得 --dma_alloc_writecombine【转】
- vue-i18n
- UE 不生成.bak文件
- 【mock】后端不来过夜半,闲敲mock落灯花 (mockjs+Vuex+Vue实战)
- Linux Windows平台添加pip源
- python包/模块路径
- ANSI、GBK、GB2312、UTF-8、GB18030和 UNICODE