Tomcat 調節緩存與內存參數

Tomcat 調節緩存與內存參數

2018年03月27日 21:12:33 在風中的意志 閱讀數:280git

版權聲明:歡迎轉載,轉載請說明出處https://csdn.yanxml.com。大數據Github項目地址https://github.com/SeanYanxml/bigdata。 https://blog.csdn.net/u010416101/article/details/79719405github

Question

Bug1: Tomcat內存大小不足。緩存

Bug2:tomcat

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原理。ide

Bug2:
tomcat 中context.xml 配置文件的 <Context></Context>中加入
<Resources cachingAllowed="true" cacheMaxSize="100000" />
相關文章
相關標籤/搜索