Unable to add the resource because there was insufficient free space available tomcat 8


Mukesh Kulal

2021-01-21 13:22:09


Unable to add the resource at [....] to the cache for web application [....] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

When you get this error in Tomcat 8 one possible solution is

1) Go to $CATALINA_BASE/conf/context.xml

2) In Context element add

<!-- The default value is 10240 kbytes, even when not added to context.xml.
So increase it high enough, until the problem disappears, for example set it to
a value 5 times as high: 51200. -->
<Resources cacheMaxSize="51200" />

as the default memory is not enough and it needs more for execution

 

 

Reference: https://stackoverflow.com/questions/26893297/tomcat-8-throwing-org-apache-catalina-webresources-cache-getresource-unable-to