aspose file tools*
The moose likes Performance and the fly likes Servlet Taking 45 seconds to respond. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Servlet Taking 45 seconds to respond." Watch "Servlet Taking 45 seconds to respond." New topic
Author

Servlet Taking 45 seconds to respond.

venki sheshgiri
Greenhorn

Joined: Jan 01, 2006
Posts: 28
One of our servlets is taking 45 seconds to respond (according to the httpwatch data) we put some debugs in our servlets service method and checked the processing time its around 4-5 seconds
I have a few queries here

1) How do find out the breakup for these 45 seconds ?
2) What are the factors I should consider (say number of concurrent access to the serlet , settings done in the WAS admin) ?
3) If it is a scalability issue from the App Server how do I go about rectifying it ?

Any inputs regarding this would be of great help.

Regards
Venkatesh M S
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

What does that Servlet do?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
venki sheshgiri
Greenhorn

Joined: Jan 01, 2006
Posts: 28
It basically authenticates the user and displays the Homepage of the solution
Let me know if you are looking for more specific data ?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

And are either of those operations liable to be slow? What does the authentication step involve? What data do you pull back to put on the home page (if any)?
venki sheshgiri
Greenhorn

Joined: Jan 01, 2006
Posts: 28
And are either of those operations liable to be slow?
Not really Development setup is takes around 3-4 seconds Production it also it is taking the same time(it has to go thru a LB and an IHS in production)

What does the authentication step involve?
this involves an interaction witn another web application which is deployed on the same Appserver.

What data do you pull back to put on the home page (if any)?
basically an applet containing some menus no retrieval of heavy data from database.

My point is in my IE watch data it says /MyServlet -45 seconds to respond with httpresponse
Inside my servlet the processing time i calculate is roughly around 4-5 seconds(in production Environment)
Where is the rest 40 seconds spent ?

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Maybe the 40 seconds is the time it takes to start the JVM for the applet on the client? How big is the applet itself: maybe it's taking a while to download. Are the classes in a single jar, or loose?


[Jess in Action][AskingGoodQuestions]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12787
    
    5
Off the wall suggestion....

Are you closing the response output stream? Perhaps the browser is waiting to display the page until it is sure it has all the data.

Bill
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

You can get a very nice breakdown on the end-to-end response time contributors using the Firebug debugger in the Firefox browser (it's an installable plugin). That's good for finding if you have excessive traffic, too much volume, or a particular contributing URL that's offending. If your app can't run except under Internet Explorer in this day and age, that, in itself indicates trouble.

On the server side, logging is always good. Log the start/end times of command processes, turn on the timing stats of your ORM subsystem (if you're using one), and consider using a profiler.


Customer surveys are for companies who didn't pay proper attention to begin with.
venki sheshgiri
Greenhorn

Joined: Jan 01, 2006
Posts: 28
folks sorry for the late reply here are the findings.

There are four App Server Nodes(WAS Cluster Setup) on which my application is deployed out of four Nodes, 3 Nodes are taking 45 seconds where as one node is taking 8 seconds

On further Analysis we found its the DB Queries(All are read only queries) which are taking around 40 seconds in these 3 Nodes.

All the four Nodes are synchronized with a deployment Manager. All configurations such as specifying db url ,JVM args are done at the deployment manager level only.

Now what we need to find is why the 3 Nodes are taking 40 seconds to run the Database Queries.

Please let me know if you need further inputs.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Taking 45 seconds to respond.