Tomcat 调节缓存与内存参数
2018年03月27日 21:12:33 在风中的意志 阅读数:280
版权声明:欢迎转载,转载请说明出处https://csdn.yanxml.com。大数据Github项目地址https://github.com/SeanYanxml/bigdata。 https://blog.csdn.net/u010416101/article/details/79719405
Question
Bug1: Tomcat内存大小不足。
Bug2:
cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
- 1
Solution
Bug1:
建议更改Tomcat的setenv.sh 或 setclasspath.sh,加入:
JAVA_OPTS='-Xms【初始化内存大小】 -Xmx【可以使用的最大内存】'
- 1
- 2
- 3
另外,可以看下JVM设置-内存-heap。简单的深入了解下JVM原理。
Bug2:
tomcat 中context.xml 配置文件的 <Context></Context>中加入
<Resources cachingAllowed="true" cacheMaxSize="100000" />