tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
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 - con...
Date Tue, 09 Dec 2014 15:47:14 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kevin,

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:
  http://tomcat.apache.org/tomcat-8.0-doc/config/resources.html
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUhxmCAAoJEBzwKT+lPKRY6tgP/RCsKanvrzvyrQnZq02sb80F
mz/dDpnybj1UFSWQUSe/trN41aC+MRnwKY5TyRlM3TLTO3NqdEPrXcIVPVTMTHft
V9HRU3kvyKNoOv5NUtwfUSmMfYUnJPxshJJ8mcWX+0MZfTJD9iBTac+stQVhh/cp
wIYxk9U+8gGVRutgCRmaWL2fTdJwAM8W2vO6E+8zcOaadclFuX+wIiIp5R//79U4
zuf1bEsl55bteFM+jRJXoc0BwA8HHUxg0sUfSw69cCAvF9AiWW81GHR+9ik6o9BE
7secshhsrvR0rssf/Balh6+xmxPumaKQeiVR7eJxzj0Ccp4n1GUHnMEWMdCZCSPM
IOad+M8QPSVCYC/AoxpuCh6A9fQtL6eeDaiCBqBK5ITypqvb6UMT+sji2fMNTIjn
C87/gZvs45BogOB+6ju7sO5iBkSq3GKRBnnUsi++wL3Ji2Sd2vpG9mD4LAOdv4S9
FLTlDkCLlf2bIrOsZ5NDfn4KZd7X/Mwr8wAwo4N5Hokze6XRh5F7XjhmxnWip6Q9
yt9JhSs/QfQdWH+HMR67BtIKM6Uj330kAiW618Z9SyHAXN8mJ3kuHawvrZxkQ6h3
z1AopJpRICVSVSeGD/joxi0JmJHeN7snv1xuYMGLlX8KZf0xx2SToYCWbA0dHwxA
qD3QqgfttqpwjwyfgxbQ
=hNru
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message