Server cache issue

We are having issues with the servers having a large number of users after upgrading to version 36. We are also having the same issue with version 38. In both cases, the number of concurrent users is above 800. The system login takes significant time and is not working properly. After restarting the application server, it worked properly with the same number of users. And after a few days, that happens again. Note that in dhis.log, there is no error. But the error is trapped in catalina.out. How could we solve the problem? @bobj

29-May-2023 11:02:29.376 WARNING [http-nio-8081-exec-1217] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/dhis-web-dashboard/static/js/data-visualizer-plugin.288ef0a
7.chunk.js] to the cache for web application [/nationalcc] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
29-May-2023 11:02:29.449 WARNING [http-nio-8081-exec-1219] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/i18n_global.properties] to the cache for we
b application [/nationalcc] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
29-May-2023 11:02:29.833 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 Contex
t [/nationalcc] - consider increasing the maximum size of the cache. After eviction approximately [66,746] KB of data remained in the cache.
29-May-2023 11:02:29.966 WARNING [http-nio-8081-exec-1227] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/dhis-web-dashboard/i18n/i18n_module_en.properties] to the c
ache for web application [/nationalcc] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
29-May-2023 11:02:30.055 WARNING [http-nio-8081-exec-1220] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/i18n_global.properties] to the cache for we
b application [/nationalcc] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
29-May-2023 11:02:30.314 WARNING [http-nio-8081-exec-1235] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/dhis-web-dashboard/static/media/roboto-latin-700.c18ee39f.w
off2] to the cache for web application [/nationalcc] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
29-May-2023 11:02:30.746 WARNING [http-nio-8081-exec-1212] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/dhis-web-tracker-capture/views/modal.html] to the cache for
web application [/nationalcc] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

The JVM is as follows. After restarting, the JVM behavior changed. Where to increase the size of the cache. In DHIS2 we don’t use ‘Resources cacheMaxSize’ in context.xml.

Hi @Hannan

The number of users might not necessarily be causing this issue. Any other clues that this could be the issue?

What the maximum size of the cache that’s set for your instance? Does the system have enough storage space?

Thanks!

There is enough storage space.
There is no separate cache allocation outside DHIS2 at the application level.

In other Tomcat applications, we usually use ‘Resources cacheMaxSize’ in context.xml. But nowadays, most applications control themselves inside the application/modules because modules might have different cash requirements.

Please check the postgresql.conf file,

What are the settings for shared_buffers as well as effective_cache_size, and it would be interesting to know the other settings too?

What versions of Tomcat, Java, and Postgresql? What’s the Java heap space set to?