tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin McKee <>
Subject Re: Tomcat 8.0.12 - unable to eliminate logs stating "org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [variousURLs] to the cache because there was insufficient free space available after evicting expired cache entries -...
Date Tue, 09 Dec 2014 16:01:18 GMT
Thanks Chris.  Yes - I want to fix whatever is causing that warning to 
appear, and thus stop it from appearing in my logs.  I’m not an expert on 
Tomcat config so please help me what settings I should remove or add in 
order to fix this issue.

Do I want to disable the cache to eliminate the warning/log, or what do 
you recommend?

Is this what I want?

<Context cachingAllowed="false">


Kevin McKee
Application Development Architect
Goodyear Canada Inc.
388 Goodyear Rd, Napanee, ON  K7R 3L2


On 2014-12-09, 3:47 PM, "Christopher Schultz" 
<> wrote:

>Hash: SHA256
>On 12/9/14 8:58 AM, Kevin McKee wrote:
>> Hi – since starting up my Tomcat 8.0.12 server, I get tons of logs
>> in catalina.out stating
>> org.apache.catalina.webresources.Cache.getResource Unable to add
>> the resource at [/variousURLs/] to the cache because there was
>> insufficient free space available after evicting expired cache 
>> entries - consider increasing the maximum size of the cache
>> After searching the docs and forums and Google I found that there
>> are some settings that will control this, but can’t find a specific
>> example of where to put these settings.  I found one article that
>> said to put them in your context.xml file – which I’ve tried, but
>> without any change.
>> This is what I’ve put in my context.xml
>> <Context path="/PlantNet" cachingAllowed="false" 
>> antiResourceLocking="false" antiJARLocking="true" cacheMaxSize="0" 
>> cacheTTL="1”>
>> Any help you could provide would be appreciated.
>Several things:
>1. Upgrade. Important fixes have gone out, lately, some more important
>than others.
>2. This is a warning, so it's not really critical that you do anything
>about it. You can feel free to ignore it if you want, but of course
>it's annoying that it's filling your log files.
>3. You can disable the warning if that's all you want to do. I
>wouldn't do that, because it means Tomcat is inefficiently-caching (or
>NOT caching) some subset of your content, which means that your site
>isn't going as fast as possible. There are other options for speeding
>things up, such as using a separate reverse proxy out front (e.g.
>Apache httpd) if that's appropriate.
>4. Your context.xml is a shambles. Where did you "look online" for
>help with this? You should refer to Tomcat's configuration reference:
>Hint: cacheMaxSize and friends don't go in your <Context> element. You
>must have been reading some online guide that was referring to Tomcat
>7 configuration, not Tomcat 8 (things changed between versions).
>5. With cacheMaxSize="0" are you trying to /disable/ the cache? The
>documentation does not say that using a size of 0 will disable the
>cache, though I suspect it would (at least effectively). If you really
>want to disable the cache, simply use cachingAllowed="false" and leave
>all other settings to their defaults.
>6. Settings cacheTTL="1" will likely cause a thread to spin constantly
>revalidating cache entries. This is probably not what you want if
>caching is (at some point) enabled.
>7. Since you are using context.xml, you MUST NOT specify a "path"
>attribute in <Context>. Instead, name your web application
>PlantNet.war and let Tomcat auto-detect the context path.
>Hope that helps.
>- -chris
>Version: GnuPG v1
>Comment: GPGTools -
>To unsubscribe, e-mail:
>For additional commands, e-mail:
View raw message