tomcat报warinig Unable to add the resource at [] to the cache

赞赏 2016-07-22

线下用的tomcat7.07,线上用了 tomcat8.5.4,就出了这个
(1)[ContainerBackgroundProcessor[StandardEngine[Catalina]]]org.apache.catalina.webresourcesXache.getResource Unable to add the resource at [/WEBINF/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
(2) [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。


waring信息大致的意思就是不能给资源加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:关闭缓存v


办法1:


增大缓存 在 conf/context.xml中加入:

<Resources
    cachingAllowed="true"
    cacheMaxSize="102400"
/>


方法2:


关闭cache 在 conf/context.xml中加入:

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

登陆后阅读全文
阅读 14661 赞赏 13 有用 65 没用 3 收藏 11 分享

   


作者声明:本篇文章系本人原创,欢迎分享,但未经许可,谢绝转载。

1 条留言

手机用户**374的头像
想知道这两种操作带来的影响?
19年7月16日

相关文章

Linux Web 环境配置站点的方法

有料推荐

这世界欠我一个这样的老公!

高校学生模仿“世界名画”摆拍,可以说是戏精本精了

iPhone X 跌破发行价,苏宁200亿入股恒大 | 财经日日评

果然是高手!这次在日本,特朗普竹杠敲得不是一般狠

资深黄牛现身说法:iPhone X价格秒变不停,就像炒股一样

长一样的双胞胎也能识别?蚂蚁金服发布「眼纹识别」技术

苏联是怎么被阿富汗拖垮的?

美团或入局「分时租赁」共享汽车,王兴要大笔投入「泛出行」领域了? | 36氪独家

你或许被“一盘番茄炒蛋”刷屏了,但有人辛酸,有人质疑

iPhone X发售前夜,黄牛与苹果公司的不安

他的文章

JAVA NIO 一步步构建I/O多路复用的请求模型

JAVA 中原生的 socket 通信机制

6款程序员必备的开源中文汉字拼音转换及处理工具 (PHP Java .net)

java如何获取网页标题title? (用htmlparser)

Tomcat9配置HTTP2的流程

快速上手 Kotlin 的 11 招

为什么我要改用Kotlin

比特币装逼指南

printf %8s %4s %-12s 这个数字是啥?

mysql: ERROR 1292 (22007): Truncated incorrect DOUBLE value:

手机扫一扫
分享文章