Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Taking 45 seconds to respond.

 
venki sheshgiri
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does that Servlet do?
 
venki sheshgiri
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
venki sheshgiri
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic