cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Translate the entire conversation x

How to resolve Cache issue - maxElementsInMemory

MA_13569279
2-Explorer

How to resolve Cache issue - maxElementsInMemory

I’ve installed Codebeamer 22.10 LTS inside a Docker container, but I’m encountering the following error:

Cache: oauth2StateCache has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client. From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory.
I attempted to resolve this by modifying the ehcache.xml file, which is located inside the JAR at:

/home/appuser/codebeamer/tomcat/webapps/ROOT/WEB-INF/lib/cb-22.10-LTS.jar
The original configuration was:


I replaced it with the following configuration:


However, the error persists. Additionally, any changes I make are lost when the container restarts, since the file resides inside a JAR.
Please help me how to reslove this issue. Thanks
1 REPLY 1

  1. Create a custom ehcache.xml on the host system with corrected config:

     
    <cache name="oauth2StateCache" maxElementsInMemory="1000" eternal="false" timeToIdleSeconds="300" timeToLiveSeconds="600" overflowToDisk="false" />
  2. Mount it into the container, e.g.:

     
    -v /opt/codebeamer/config/ehcache.xml:/home/appuser/codebeamer/conf/ehcache.xml
  3. Pass the path via Java system property:

     
    -Dnet.sf.ehcache.configurationResourceName=file:/home/appuser/codebeamer/conf/ehcache.xml
  4. Restart the container to apply changes.

This ensures the custom cache config is used persistently without modifying internal JAR files.

Thanks,

Shashi Preetham,
+91 8099838001 | shashi@psptechhub.com,
PSPTechHub  ||  World of PTC Thingworx  ||  LinkedIn
Announcements


Top Tags