users@glassfish.java.net

Delay in web service response

From: <glassfish_at_javadesktop.org>
Date: Wed, 29 Apr 2009 09:35:32 PDT

Hi Folks,

I've deployed two web services (say A and B) in Glassfish V2ur1. A receives around 60 hits a minute and B just 1 or 2. There is a constraint on the response time for B, which is to be less then 5 seconds. This is where the problem is.

A request with a new parameter returns in about 11 seconds for the first time. The subsequent request with the same parameter takes only less than 2 seconds.

In the server the request arrives within 1 second and the processing is completed in less then 1 second. However, the service monitor shows a response time of 10 to 11 seconds. I don't understand were the remaining 8 seconds is getting added.

The web service is deployed as an EJB and is build on JAXWS 2.0. All the tracing shows that the delay is after the call has returned from the web service method. It then means it is during the time the object containing the response data is remolded to be sent as a SOAP xml.

I would be glad to receive some suggestion on what could be going wrong to cause the delay. Can I do some tuning to improve on the response time?

It may be helpful to note that when the response has null on the only date field, it promptly returns, but when the date is present it takes longer.

Thanks,
Rachit
[Message sent by forum member 'rachit84' (rachit84)]

http://forums.java.net/jive/thread.jspa?messageID=344349