Wildfly 10.1 Consuming All Cores

╄→尐↘猪︶ㄣ 提交于 2019-12-06 12:55:51

Sadly, my magical crystal ball is broken, so we will have to get our hands dirty with thread dump.
First, we need to figure out, what thread is causing the Cpu load, as app server is not single-threaded. Assumimg you are on linux, you can use standard ps to get details of cpu usage per process thread:

ps -eLo pid,lwp,nlwp,ruser,pcpu,stime,etime,args | grep [PID_OF_YOUR_WILDFLY_PROCESS] > unixthread.txt

Here we are interested in columns nlwp lwp and pcpu. Find the threads with highest cpu load.
Next we need java thread dump: Obtain a thread dump during the period of high CPU load:

jstack -l [PID_OF_YOUR_WILDFLY_PROCESS] > jstack.out

And now for some thread hunting: say your unixthread identified a thread with nwlp 9999 as the CPU hog, convert the number to hex- 0x270F and search for this value in your jstack.out file. It should match a java thread, with stacktrace that should help you pinpoint the problem.

If it is GC related, then proceed with heap dump to ensure it ia not a leak in your app.
If you do your analysis and still think it is an issue with jvm or gc settings, you should get in touch with redhat guys. I believe, that if you intend to run a banking app on RedHat stack, you should definitely go for EAP7 with paid support and not hazzard with Upstream OS project without support for eventual bugs or issues.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!