insufficient free space available after evicting expired cache entries

cancel
Showing results for 
Search instead for 
Did you mean: 
mangar
Established Member II

insufficient free space available after evicting expired cache entries

Jump to solution

When starting uo the AIO for SDK4.2   I am getting my logs filled with statements like these:

alfresco-share_1  | 01-May-2021 15:30:42.908 WARNING [main] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/org/springframework/beans/factory/xml/spring-beans.xsd] 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

It looks like it's a setting for Tomcat,  but as a Docker AIO user,  How do I fix this?  I don't want to ignore it. 

 

1 Solution

Accepted Solutions
mangar
Established Member II

Re: insufficient free space available after evicting expired cache entries

Jump to solution

So building on previous reply,  to fix:

1. in your AIO share-docker/src/main/docker   add this file  context.xml

<?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 -->
<Context>
	<Resources cacheMaxSize="51200" cachingAllowed="true"/>
    <!-- Default set of monitored resources. If one of these changes, the    -->
    <!-- web application will be reloaded.                                   -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
</Context>

2.  add this line to your Dockerfile:  (at the end is fine)

COPY context.xml $TOMCAT_DIR/conf

run a build_start and those warnings go away.

View solution in original post

2 Replies
venur
Established Member

Re: insufficient free space available after evicting expired cache entries

Jump to solution

Yes it will be fixed from tomcat level maybe 

default value for resource caching is 10240 kbytes, even when not added to tomcat\conf\context.xml

You can try updating the cache settings or disable it. May be it will fix 

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

Or disable it: 
<Resources cachingAllowed="false" />
mangar
Established Member II

Re: insufficient free space available after evicting expired cache entries

Jump to solution

So building on previous reply,  to fix:

1. in your AIO share-docker/src/main/docker   add this file  context.xml

<?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 -->
<Context>
	<Resources cacheMaxSize="51200" cachingAllowed="true"/>
    <!-- Default set of monitored resources. If one of these changes, the    -->
    <!-- web application will be reloaded.                                   -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
</Context>

2.  add this line to your Dockerfile:  (at the end is fine)

COPY context.xml $TOMCAT_DIR/conf

run a build_start and those warnings go away.