Tomcat啟動報錯或警告: org.apache.catalina.webresources.Cache.getResource Unable to add the resource

  • 2019 年 10 月 10 日
  • 筆記

Tomcat啟動報錯或警告: org.apache.catalina.webresources.Cache.getResource Unable to add the resource

2016年10月09日 10:57:32 余不二 閱讀數 15186 文章標籤: javatomcatcache 更多

分類專欄: lan:JAVA

版權聲明:本文為部落客原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。

本文鏈接:https://blog.csdn.net/yu452148611/article/details/52764493

報錯資訊如下:**為任意位置

org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [**] to the cache because there was insufficient free space available after evicting expired cache entries – consider increasing the maximum size of the cache

只要在$CATALINA_BASE/conf/context.xml里增加資源最大可快取的大小就行了,大小可按自己的需要定義


  1. <?xml version='1.0' encoding='utf-8'?>
  2. <Context>
  3. <WatchedResource>WEB-INF/web.xml</WatchedResource>
  4. <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
  5. <Resources
  6. cachingAllowed="true"
  7. cacheMaxSize="100000"
  8. />
  9. </Context>

更多配置可參考http://tomcat.apache.org/tomcat-8.0-doc/config/resources.html里的詳細參數

(adsbygoogle = window.adsbygoogle || []).push({});