> [....] > Il 26/07/2021 23:15, Christopher Schultz ha scritto: > > Ivano, > > > > On 7/23/21 02:20, Ivano Luberti wrote: > >> I have found the issue: one of the webapps has several thread locked > >> on a MultiThreadedHttpConnectionManager during sessionUnbound and > >> unboundEvents. > >> > >> So the background process killing the sessions is stuck as well. > > > > This is a very easy problem to encounter. Session event-handlers > > really need to be bulletproof and execute very quickly. > > > > If you need a long-running process to trigger, use an executor service > > or something where you can capture the information to be used and > > off-load it onto another thread. Remember that the session cannot be > > used after the event-handler completes, so capture whatever > > information you need from the session FIRST, then dispatch to another > > thread, then return from the event-handler. > > > > -chris > > > >> Il 21/07/2021 18:13, Mark Thomas ha scritto: > >>> On 21/07/2021 16:00, Ivano Luberti wrote: > >>>> > >>>> Il 21/07/2021 16:44, Mark Thomas ha scritto: > >>>>> Take 3 thread dumps 5 seconds apart and post them here. > >>>> > >>>> How to take thread dumps? > >>>> > >>>> kill -3 <pid> ? > >>> > >>> That will work. There are lots of ways. This is most of them: > >>> > >>> https://www.baeldung.com/java-thread-dump
I usually refer to troubleshooting pages of Tomcat FAQ: https://cwiki.apache.org/confluence/display/TOMCAT/Troubleshooting+and+Diagnostics#TroubleshootingandDiagnostics-Techniques&Reference https://cwiki.apache.org/confluence/display/TOMCAT/HowTo#HowTo-HowdoIobtainathreaddumpofmyrunningwebapp? Additional note: the "backgroundProcessorDelay" on a Context can be used to make a web application use its own background thread (instead of reusing the one inherited from its parent container). It won't help with fixing a deadlock in a particular web application, but it will isolate the failure so that other web applications on the same server won't suffer. https://tomcat.apache.org/tomcat-8.5-doc/config/context.html Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org