开发者

Troubleshooting a Hanging Java Web App

开发者 https://www.devze.com 2023-03-18 17:33 出处:网络
I have a web application that hangs under high loads.I\'m not going to go into the specifics of the code because I really just want some troubleshooting advice and tooling recommendations.

I have a web application that hangs under high loads. I'm not going to go into the specifics of the code because I really just want some troubleshooting advice and tooling recommendations.

It's a web app, so each request get's a thread. Under a high load test, the app begins to consume all of the cpu, while becoming unresponsive. I suspect that the request threads are hanging in the new code that we are testing. Due to the fact of the cpu consumption, I'm assuming this must be on my app side. My understanding, which could be wrong, is that total cpu consumption indicated my first troubleshooting efforts should be in looking at the code that's consuming those cycles.

What are some tools and/or me开发者_开发问答thods for inspecting which threads are hanging and on what lines of code? Again, I can easily force the app into the problematic behavior.

I've found and been trying out visualvm. Seems like the perfect tool. Still open for suggestions though. I looked at eclipse TPTP and it seems to be end-of-life-ing as well as requiring a more heavy weight deployment.


You can insert logging messages at starting a thread and closing a thread. Then you start the application and inspect the output while penetrating the code.

Another way is to look for memory leaks. If you are sure you haven't one, you can extend the virtual memory of your JVM.


@chad: do you have Database in whole picture...you may want to start by looking what is happening at DB side...you can very well look into DB locks, current sessions etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消