> On 2025 Mar 27, at 16:06, Yuta Akiya <yuta.ak...@logisteed-sa.com.invalid> 
> wrote:
> 
> I am using Tomcat 9.0.78 on a machine running Windows Server 2019 Standard.
> 
> I am experiencing an issue with an instance of 
> `org.apache.catalina.webresources.Cache`, where `Cache.size` is out of sync 
> with the actual size of `Cache.resourceCache` in memory. 
> Based on a heap dump of the server, `Cache.size` has a value of 700,932,119 
> while the actual size of the `Cache` instance is merely 4.45 KB. 
> This issue causes unnecessary and misleading logs to be outputted such as the 
> one below, where 684,534 KB is from the value of `Cache.size` which is 
> corrupt.
> 
>> 26-Mar-2025 11:50:35.267 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 [/...] - consider increasing the maximum size of the cache. After 
>> eviction approximately [684,534] KB of data remained in the cache.
> 
> `cacheMaxSize` in `context.xml` is not explicitly set, so it defaults to 10MB.
> 
> I believe commit `636017459a88befe1c5f1fd9d8f31ff2f13f74f6` by Mark Thomas 
> should fix this issue, but I wanted to ask for opinions here just to be sure.
> Is it safe to assume that upgrading Tomcat to a version that includes above 
> commit will fix this issue?


That (and a couple of subsequent changes) should fix the problem.

Not updating Tomcat in over a year and a half is rather risky by itself, so you 
really should upgrade to the current version regardless.

  - Chuck


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

Reply via email to