> On Jul 10, 2024, at 15:19, Jalaj Asher 
> <jalaj.as...@eclinicalworks.com.INVALID> wrote:
> 
> We are using tomcat version 9.0.80.
> 
> We are seeing intermittent CPU spikes with the requests  having the following 
> stack and it is also causing disk spikes on our end because of this call 
> stack .
> 
> at java.util.zip.ZipFile.getEntry(Native Method)
> at java.util.zip.ZipFile.getEntry(ZipFile.java:328)
> - locked <0x00000000bb4fbf08> (a java.util.jar.JarFile)
> at java.util.jar.JarFile.getEntry(JarFile.java:253)
> at java.util.jar.JarFile.getJarEntry(JarFile.java:236)
> at 
> org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:97)
> at 
> org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:249)
> at 
> org.apache.catalina.webresources.StandardRoot.getResourcesInternal(StandardRoot.java:316)
> at 
> org.apache.catalina.webresources.StandardRoot.getResources(StandardRoot.java:307)
> at 
> org.apache.catalina.webresources.StandardRoot.getClassLoaderResources(StandardRoot.java:226)
> at 
> org.apache.catalina.loader.WebappClassLoaderBase.findResources(WebappClassLoaderBase.java:1009)
> at 
> org.apache.catalina.loader.WebappClassLoaderBase.getResources(WebappClassLoaderBase.java:1110)
> at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348)
> at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
> at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
> at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:293)
> at java.security.AccessController.doPrivileged(Native Method)
> 
> these are the runnable threads.
> 
> Wanted to get some understanding to see when does tomcat access the 
> archiveresourceset and why is it calling getjarentry and zip file entry and 
> any suggestions to address this issue ?


Is unpackWARs set to false in the <Host> element, or is unpackWAR false in the 
<Context> element for the webapp(s)?

Have you disabled resource caching for the webapp(s)? Look at any <Resources> 
element inside a <Context> for the cachingAllowed and related attributes.

There’s a somewhat long discussion on this topic starting here:
https://marc.info/?l=tomcat-user&m=169909563517770&w=2

  - Chuck

Reply via email to