Last active
January 16, 2025 13:05
-
-
Save aitseitz/4ddf03cb3be6913ab44f2ffcb8ce06ec to your computer and use it in GitHub Desktop.
ACS "consider increasing the maximum size of the cache"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO [localhost-startStop-1] [catalina.startup.HostConfig] Deploying deployment descriptor [/opt/content-services/tomcat/conf/Catalina/localhost/share.xml] | |
... | |
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache | |
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache | |
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--> | |
<!-- The contents of this file will be loaded for each web application --> | |
<!-- If we deploy applications in our server that still uses System.out and/or System.err, | |
we can force them to use our logger adding swallowOutput="true" in the default | |
$CATALINA_BASE/conf/context.xml of the server. | |
--> | |
<Context swallowOutput="true"> | |
<!-- Default set of monitored resources. If one of these changes, the --> | |
<!-- web application will be reloaded. --> | |
<WatchedResource>WEB-INF/web.xml</WatchedResource> | |
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> | |
<!-- Uncomment this to disable session persistence across Tomcat restarts --> | |
<!-- | |
<Manager pathname="" /> | |
--> | |
<!-- If not specified, the default cacheMaxSize value is 10240 kb (10 megabytes) | |
and the default cacheObjectMaxSize is 512kb (0.5 megabytes) | |
see: http://tomcat.apache.org/tomcat-8.5-doc/config/resources.html | |
Increased Cache value to get rid of the WARN messages: | |
WARN Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] | |
because there was insufficient free space available after evicting expired cache entries | |
- consider increasing the maximum size of the cache | |
--> | |
<Resources cachingAllowed="true" cacheMaxSize="{{ tomcat_resource_cache_max_size | default ('10240') }}" cacheObjectMaxSize="{{ tomcat_resource_cache_object_max_size | default('512') }}" /> | |
</Context> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to handle "consider increasing the maximum size of the cache" Messages when booting up Alfresco Content Services
If you follow the Alfresco Content Services Installation via distribution.zip you might end up getting the following WARN Messages when booting up the Tomcat:
WARN [localhost-startStop-1] [catalina.webresources.Cache] Unable to add the resource at [/WEB-INF/classes/] to the cache for web application [/share] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
Solutions:
You have serveral options to handle that kind of WARN message
which are really good described in this stackoverflow case:
https://stackoverflow.com/questions/26893297/tomcat-8-throwing-org-apache-catalina-webresources-cache-getresource-unable-to
In case of Alfresco and Share the solution to increase just the case size globally via
$CATALINA_BASE/conf/context.xml like
<Resources cacheMaxSize="XXXXX" />
is not enough to get rid of all the WARN messages. Specially for the /share context we also need to increase the cacheObjectMaxSize from default 512kb to at least 1024kb.
This can either be done globally in the $CATALINA_BASE/conf/context.xml
with
<Resources cacheMaxSize="204800" cacheObjectMaxSize="1024">
or via the share.xml deployment descriptor to increase only the objectCache for share.war:
Dokumentation see:
http://tomcat.apache.org/tomcat-8.5-doc/config/resources.html#Attributes