springboot 自带tomcat启动报错

使用springboot自带的tomcat,在启动的时候报错如下,


2016-12-17 20:32:36,177 INFO  [ContainerBackgroundProcessor[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]] o.a.catalina.webresources.Cache - [] 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 [9,620] KB of data remained in the cache.

然后用free命令看了下内存使用情况


             total       used       free     shared    buffers     cached
Mem:       1922200    1202808     719392        176       8212     137504
-/+ buffers/cache:    1057092     865108
Swap:      1015804     132020     883784

我本身的项目war包才64M,这个不是缓存的问题,我把cache清空了,依旧报这个错误,比较困惑,不知道如何解决了。

我弃用了springboot自带的tomcat,配置了自己的tomcat依然报这个错误,不知道如何解决?

阅读 6.7k
2 个回答

我觉得把那个错误翻译过来就知道答案了

如果是用tomcat,那在你的tomcat_home/conf/Catalina/localhost/里的context文件里,添加这么一行:

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

把cacheMaxSize调大就行了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题