Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application goes non-responding

Status
Not open for further replies.

cagwhiz

IS-IT--Management
Feb 5, 2008
3
0
0
US
Hi,

We have a J2EE web application that runs on tomcat and apache.At times, while performing transactions, the page goes blank.Users just gets blank screen.When other users try to access the application for performing some other transaction wont even be able to open home page as if the entire application is affected.The application gets back to normal after restarting tomcat application service.

If we look at the jvm.stdout, we can see some exceptions.My question is how these exceptions are resolved on restarting service?

Any idea on this performance issue? Or, suggestions on tuning the application to prevent such resource crunches ?
 
More information would be helpful. Do you have the source code? Do you know which class is affected? When this occurs, is it using 100% of available CPU? What types of exceptions do you see?
 
Hi jaxtell,

This issue can be thrown from any module of that web application and is random.The type of exceptions also vary...some of those exception which I oberved during that time are

java.sql.SQLException: ORA-00001: unique constraint (BUDGET.VENDOR_VND_NUM_UNQ) violated

And, Null pointer exception etc...

 
I'd like to help, but I think your issues might be too complicated to solve in a forum. But here are a couple things to consider. Can the issues be reproduced. If I do x then y then z and it fails, you restart the server, I do x then y then z, will it fail again? Are those exceptions only showing up in a log and allowing the user to continue on? I've seen similar issues where you expect the database to contain certain data but because of some error its not. All of a sudden you get unexpected behavior from your application. Improper error handling is a likely cause of weird, seemingly random, problems.
 
The issues can not be reproduced.When I do x the y then z it fails.And, i can do the same transaction successfully after restarting the service.Yes...those exceptions are thrown in the log only when it fails & user receives nothing on the page, except blank screen as if the process is goin on after after certain he will be redirected to login screen...ie, session out happens.
Even I am suspecting improper error handling.I believe, some error which is not caught & handled by applcation eats up all server resources and kind of putting the other users on a dealock situation.Let me know you opinion.If you can share effective way of error handling. Unfortunately I am not a progarmmer,but i have a team whom I can guide.
 
Are we talking about a production environment, or is this application still in a development or testing phase? I'd say if its development or test, every generic exception block should halt the program. Handle or prevent expected errrors. For instance, one of your examples was a SQLException. I'd try to change to code to check for uniqueness before attempting the insert. If thats not possible, try to get the exact error out. If you can tell its a unique constraint error, you can either make the necessary corrections programatically, or inform the user so they can attempt the change. By the time you're done, hopefully you'll have no, or at least very few, generic exception blocks. You'll be better off having an application that dies on a severe error than you would be with one that keeps on going like everything is ok. At least then you can address each error as it happens, make the corrections, and have a well running application. The sooner you fix/prevent bugs, the more you'll save in the long run. Hope this helps.

Josh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top