views:

460

answers:

3

We have a java-based web application that makes a couple bursts of asynchronous http calls to web services & api's. Using a default Jetty configuration, the application takes roughly 4 seconds to complete. The same operation in Tomcat is taking over a minute.

A slew of configuration changes for Tomcat have been attempted, but nothing seems to help. Any pointers?

A: 

It's not logical that tomcat needs 60 seconds for processing something that Jetty solves in 4. They are both executing Java code.

Is there thread congestion on tomcat? How many threads can the http connectors of tomcat and jetty handle at the same time? What is your configuration?

cherouvim
+1  A: 

Use a profiler to investigate where the time is spent. A good initial choice is jvisualvm in the JDK.

My initial guess would be a DNS issue.

Thorbjørn Ravn Andersen
A: 

One suggesting i have to get to the bottom of your problem is to download the Tomcat source and step through the code. Although as mentioned... profiling would save you allot of time. Odd are that its a DNS issue.

Paul