欢迎阅读!

潇湘夜雨

当前位置: 主页 > 服务器 >

tomca8错误解决

时间:2016-11-06 17:54来源:潇湘夜雨 作者:华嵩阳 点击:
这次用的是 tomcat8.5.4,用tomcat7.07就没有这个问题,错误信息如下图: 核心的就以下两条: 22-Jul-2016 11:12:35.969 WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.webresourc
这次用的是 tomcat8.5.4,用tomcat7.07就没有这个问题,错误信息如下图:
 
核心的就以下两条:
22-Jul-2016 11:12:35.969 WARNING  
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/lib/libsigar-x86-linux.so] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
22-Jul-2016 11:12:35.969 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [] - consider increasing the maximum size of the cache. After eviction approximately [10,228] KB of data remained in the cache
大致就是不能给资源加cache了,因为没有足够的可用空间了。
原来
tomcat8中增加了静态资源缓存的配置
以下是两个相关参数说明:
--------------------------------
cacheMaxSize:静态资源缓存最大值,以KB为单位,默认值为10240KB
The maximum size of the static resource cache in kilobytes. If not specified, the default value is 10240 (10 megabytes). This value may be changed while the web application is running (e.g. via JMX). If the cache is using more memory than the new limit the cache will attempt to reduce in size over time to meet the new limit. If necessary, cacheObjectMaxSize will be reduced to ensure that it is no larger thancacheMaxSize/20.
cachingAllowed:是否允许静态资源缓存,默认为true
If the value of this flag is true, the cache for static resources will be used. If not specified, the default value of the flag is true. This value may be changed while the web application is running (e.g. via JMX). When the cache is disabled any resources currently in the cache are cleared from the cache.
解决方法有两种, 
1:考虑增加cache的最大大小 
2:关闭缓存
解决方法1: 增大缓存
在 conf/context.xml中加入:
<Resources cachingAllowed="true" cacheMaxSize="100000"/>
 
解决方法2: 关闭cache
在 conf/context.xml中加入:
<Resources cachingAllowed="false"cacheMaxSize="0" />
(责任编辑:liangzh)
织梦二维码生成器
顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
推荐内容