4

Since switching to Tomcat 8, I continually get messages like this in my catalina.out

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

I've found in the docs to add entries like cachingAllowed="false" antiResourceLocking="false" antiJARLocking="true" cacheMaxSize="0" cacheTTL="1" to my META-INF/context.xml file which I've done, but this doesn't seem to eliminate the problem.

Does anyone know how to stop these messages?

Thanks

a344254
  • 571
  • 2
  • 9
  • 20
  • Does this answer your question? [Tomcat 8 throwing - org.apache.catalina.webresources.Cache.getResource Unable to add the resource](https://stackoverflow.com/questions/26893297/tomcat-8-throwing-org-apache-catalina-webresources-cache-getresource-unable-to) – Douglas Royds Sep 02 '21 at 03:07

4 Answers4

3

I had the same issue but found an answer in another post which worked for me

In your $CATALINA_BASE/conf/context.xml add the block below before

</Context>

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

This solved it for me.

Funlounge
  • 31
  • 2
0

“inside the tag ” in where, I think :

  1. Tomcat/bin/catalina.bat int this add set JAVA_OPTS=-Xms256m -Xmx512m -Djava.awt.headless=true [-XX:MaxPermSize=128M]
  2. eclipse->windows->preferences..->tomcat->jvm..->jvm add -Xms256m -Xmx512m
  3. eclipse->preference->Java->instal jres->edit add -Xms256M -Xmx640M -XX:PermSize=256m -XX:MaxPermSize=768m
HebeleHododo
  • 3,620
  • 1
  • 29
  • 38
0

For anyone who is still looking for a solution. This line should be added inside the Context tag

<Context ...>
...
<Resources cachingAllowed="true" cacheMaxSize="100000" />
</Context>
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
-2

For anyone else unable to find an answer to this problem, the answer seems to be as simple as adding this to your $SERVER_HOME/conf/context.xml inside the tag

a344254
  • 571
  • 2
  • 9
  • 20