Created attachment 37374 [details] too many processor in processors of RequestGroupInfo httpnio processor release exist processor no unregister from jmx bean at concurrent invoke push method of RecycledProcessors @SuppressWarnings("sync-override") // Size may exceed cache size a bit @Override public boolean push(Processor processor) { int cacheSize = handler.getProtocol().getProcessorCache(); boolean offer = cacheSize == -1 ? true : size.get() < cacheSize; //avoid over growing our cache or add after we have stopped boolean result = false; if (offer) { result = super.push(processor); if (result) { size.incrementAndGet(); } } if (!result) handler.unregister(processor); return result; } cacheSize default is 200,if current size is 199 is lower 200 and two thread push processor at the same time ,all offer is true,so result also is true. so processor cache is more than 200 ,so no do unregister with processor, so the processor don't remove from the processors of RequestGroupInfo and running time too long,the processor cache is too many,because new create processor is do register to jmx and add to the processors of RequestGroupInfo so the sync-override is need add
now we use the processorCache params resolve the problem,by set processorCache=0 but can't use cache,create byte[] for every request please help me thanks
any body can help please。we has many tomcat has gc problem online
The root cause analysis is not correct. While the size of the cache may exceed the configured size slightly (as per the comment) it won't exceed it excessively as shown in the attachment. 9.0.5 is 2.5 years old and there have been many fixes since then including at least one that addresses an issue that has the same symptoms as presented here. If the issue is still observable with the latest 9.0.x release then feel free to re-open this issue, provide the *minimal* steps to recreate it from a clean install and someone will take a look.
Thanks Mark Thomas 's help ,the cache size exceed shown in the attachment is tomcat6,the default cache size is -1 in tomcat6,so has many request processor cached the tomcat7/8/9 the default cache is is 200,may be the size of the cache may exceed the configured size slightly (as per the comment),but if concurrent request is too many at a moment,the cache is also exceed the configured size the code is flow of tomcat9.0.37: @SuppressWarnings("sync-override") // Size may exceed cache size a bit @Override public boolean push(Processor processor) { int cacheSize = handler.getProtocol().getProcessorCache(); boolean offer = cacheSize == -1 ? true : size.get() < cacheSize; //avoid over growing our cache or add after we have stopped boolean result = false; if (offer) { result = super.push(processor); if (result) { size.incrementAndGet(); } } if (!result) handler.unregister(processor); return result; } may be override the method of push at will?,we upgrade tomcat to tomcat9 thanks