I am monitoring a system that has been done in Java and at certain times during the day most threads, about 95%, enter WAIT state and wait for about 50 seconds on average, and sometimes the interval between pauses is 5 minutes. The result is that all user requests are waiting.
My question is how do I know which Thread has put all the others to wait? I've used some software that looks at Thread Dump, but I could not find the cause yet.
I'm wary that it's the GC that cleared the memory and put everything on hold until it was done.
In this image, at 10:16 the great majority entered the state WAIT, I had to cut the photo because there are many more Threads and all in the same state.