1

I've been struggling with the problem of high load for several months now. The server literally stops working. It is necessary periodically to reboot it so that users can continue to work. Please tell me how to find the problem.

CPU high load Thread dump monitor sampler hot spots

CPU normal work Thread dump monitor sampler hot spots

Vladimir
  • 157
  • 2
  • 16
  • Please, specify what platform you are using (Windows/Linux/other and its version), Java version, and heap-related command line parameters (-Xmx, -Xms, -XX if any, etc). – yegodm Sep 11 '17 at 09:30
  • Centos 6.9, -Xms5496M -Xmx5496M -XX:MaxPermSize=1456M, Oracle JDK 1.8.0_144 – Vladimir Sep 11 '17 at 12:22
  • Could you also share the full thread dump ('Threads' tab/'Thread Dump' button), if possible, please? screenshots you attached do not show any particularly suspicious activity. I just wonder if there are other threads that might be really busy to consume CPU that much. – yegodm Sep 11 '17 at 15:21
  • @yegodm References to thread dumps present in the text of the question. Is duplicate link here without decoration: 1) CPU high load: https://drive.google.com/file/d/0B6aJ6H5VNJ4XT0FKVUVDQ1otSlU/view?usp=sharing 2) CPU normal work: https://drive.google.com/file/d/0B6aJ6H5VNJ4XRVZ1dVdRRkxQZU0/view?usp=sharing – Vladimir Sep 11 '17 at 19:41
  • Oh, sorry, thread-dumps are there. Please, ignore my previous comment - could not get through the links due to the company firewall. – yegodm Sep 11 '17 at 19:46
  • 1
    In the high load scenario 24 of presumably 36 http-requests seems to be processing `SubjectListServiceImpl.getActiveSubjects`. How normal is that activity? Are you sure there is no bug in the client side that continuously invokes this method at a very high rate? – yegodm Sep 12 '17 at 08:57
  • 1
    Another thing that probably matters - a few threads are performing auto-flush in seemingly read-only queries (Thread t@418, Thread t@365, etc). Flushing is not a cheap operation and typically may cause CPU spikes. Please, have a look at this question/answers - https://stackoverflow.com/questions/14403498/how-to-prevent-hibernate-from-flushing-in-list. – yegodm Sep 12 '17 at 09:49
  • @yegodm thank you very much. We do have a long method `SubjectListServiceImpl.getActiveSubjects` although it can legitimately be called quite often. I'll try to disable the flush for it. And it seems now that I understand much better how to read a thread dump. Thank you! I will unsubscribe when I check the results. – Vladimir Sep 12 '17 at 14:12

0 Answers0