What parameter to tweak for: 'The background cache eviction process was unable to free...'?

As per the title, I found this warning while updating from 15.10.11 to 15.10.14:

org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [46,138] KB of data remained in the cache.

I searched through the config files for “cache”, but came up with several lines, which one should I edit?

1 Like

which one should I edit?

Depends, what you installed exactly:

  • if you used the tomcat9 based XWiki Debian package the value to update is located in /etc/xwiki/xwiki-tomcat9.xml (search for the cacheMaxSize attribute)
  • for others Tomcat setups, it’s generally located in the file META-INF/context.xml of the XWiki WAR

When you found the right value, don’t hesitate to create an issue on Loading... to suggest it.

2 Likes

XWiki WAR manually installed in Tomcat (9), hence I guess it’s this one:
/opt/tomcat/9/latest/webapps/xwiki/META-INF/context.xml: <Resources cacheMaxSize="50176" />

And… is the one documented here?
https://tomcat.apache.org/tomcat-9.0-doc/config/resources.html#Attributes_Common%20Attributes_cacheMaxSize

I doubled it to 100352, I see no messages about the cache.
Is it fine?

I generally try to find a value as small as possible for the standard version (to not allocate more than needed by default). That’s also why it needs to be updated from time to time (XWiki dependencies have a tendency to grow a bit for now, maybe one day we’ll be able to go more in the other direction).

1 Like

I dug a little more on this and discovered that the message looks to have appeared only on the last update, during reboots:

./catalina.2024-12-01.log:01-Dec-2024 16:50:10.806 INFO [Catalina-utility-2] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [45,326] KB of data remained in the cache.
./catalina.2024-12-01.log:01-Dec-2024 17:48:20.786 INFO [Catalina-utility-1] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [45,267] KB of data remained in the cache.
./catalina.2024-12-01.log:01-Dec-2024 17:56:59.119 INFO [Catalina-utility-1] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [46,515] KB of data remained in the cache.
./catalina.2024-12-01.log:01-Dec-2024 18:04:47.430 INFO [Catalina-utility-1] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [46,138] KB of data remained in the cache.
./catalina.out:01-Dec-2024 16:50:10.806 INFO [Catalina-utility-2] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [45,326] KB of data remained in the cache.
./catalina.out:01-Dec-2024 17:48:20.786 INFO [Catalina-utility-1] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [45,267] KB of data remained in the cache.
./catalina.out:01-Dec-2024 17:56:59.119 INFO [Catalina-utility-1] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [46,515] KB of data remained in the cache.
./catalina.out:01-Dec-2024 18:04:47.430 INFO [Catalina-utility-1] org.apache.catalina.webresources.Cache.backgroundProcess The background cache eviction process was unable to free [10] percent of the cache for Context [/xwiki] - consider increasing the maximum size of the cache. After eviction approximately [46,138] KB of data remained in the cache.

(our catalina.out is accumulating since feb 2023)

1 Like

Ooops, edited the post too much!

Since it looks like it is logged only on restarts - on my instance - is it really necessary to change that value? I have just a bunch of users here.