Hello Stephane, > Von: Stephane Passignat <passig...@hotmail.com> > Gesendet: Mittwoch, 29. Juni 2022 20:36 > An: users@tomcat.apache.org > Betreff: Tomcat freezes with axios > > Hello, > > I'm creating a SAP application performing REST call on an API running on > Tomcat. Tomcat runs behind an apache reverse-proxy and communication > between them use http. The calls are executed with axios using a basic > authentication. > > > Everything runs fine for a moment, but for an unknown reason all http > request are hanging after some time and hundreds or maybe thousands > requests (if these metrics make any sense). > > > In chrome, the requests are in a 'pending' status. > > Restarting chrome allows to do one or two requests and then issue occurs > again > > Restarting apache doesn't change anything. > > Restarting Tomcat resolve the situation. Tomcat shutdow is a bit longer. > Request in chrome ends when tomcat stops. > > > I'm not very inspired by this issue and actually trying to find > inspiration in jmx and log files but nothing pops up. > > > Does someone have an idea ? > > > > thanks > > Stephane
It looks like some processes are blocking and using up all http-threads till no thread is available to take further connections. I would recommend to take one or more stacktraces of the java process to check for blocking threads. You can use jstack from the console or use kill -3 <pid> (linux). Another option is to use jvisualvm if you configured a jmx remote port. After connecting to the java process there is a button to take a stack from the process. Look for threads which holds locks or are blocked by locks. Sometimes it'S helpful to compare several stacks taken at different times. Greetings, Thomas