tomcat配置缓存溢出异常

tomcat服务器后台容易报错,报缓存溢出

报错信息:

[ContainerBackgroundProcessor[StandardEr»gine[Catalina]]] org.apache.catalina.webresourcesXache.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 110,228] KB of data remained in the cache。

报错信息大致的意思就是不能给资源加cache了,因为没有足够的可用空间了。

原因:

原来 tomcat8中增加了静态资源缓存的配置 .cacheMaxSize:静态资源缓存最大值,以KB为单位,默认值为10240KB .cachingAllowed:是否允许静态资源缓存,默认为true

对应两个参数,解决方法有两种:
1:考虑增加cache的最大大小 
2:关闭缓存

设置配置(位置:conf/context.xml):

在<Context>键值对中配置

<Resources
     cachingAllowed="false"
     cacheMaxSize="0"
    />

如图:

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值