Hope everybody is doing OK.
I have a webservice which I request via https://. I'm also using WSE to
generate an authenticated token.
I understand that the very first call to the webservice is slow because the
webservice needs to JIT. But I've noticed that after a period of time, when
the webservice is not being used, the request is slow again (only the first
time) and then subsequent requests are responded faster. It's like it went
to sleep and needs to be awake in order to respond to the request faster.
I've used webservices before and I never experience this behavior. Any
ideas why this could be happenning???
Maybe related to https:// or WSE???
Thanks in advance for any input.
Marlene
Hi Marlene,
I experience this as well, i always assumed it was because when the service
hasn't been used for a while
the application gets stopped and as soon as the next request comes in, the
application needs to be restarted.
The effect can especially be seen if a lot of processing takes place on the
startup of the webservice.
I've never looked into whether this behaviour can be reconfigured e.g.
increase the amount of time the webservice can remain idle without being
stopped etc.
Andrew
> Hope everybody is doing OK.
>
[quoted text clipped - 18 lines]
>
> Marlene
Gaurav Vaish (www.EduJiniOnline.com) - 24 Sep 2006 15:14 GMT
> I experience this as well, i always assumed it was because when the
> service hasn't been used for a while
> the application gets stopped and as soon as the next request comes in, the
> application needs to be restarted.
Please check my response on to your query posted on the other group as well.
For testing purpose and final deployment, please publish the website
(precompile) with dynamic updates "disabled" so that there's no need for any
compilation on the fly at all.

Signature
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://www.edujinionline.com
http://articles.edujinionline.com/webservices
-------------------
> I understand that the very first call to the webservice is slow because the
> webservice needs to JIT. But I've noticed that after a period of time, when
> the webservice is not being used, the request is slow again (only the first
> time) and then subsequent requests are responded faster. It's like it went
> to sleep and needs to be awake in order to respond to the request faster.
others wrote:
> I experience this as well, i always assumed it was because when the
> service hasn't been used for a while
> the application gets stopped and as soon as the next request comes in, the
> application needs to be restarted.
> For testing purpose and final deployment, please publish the website
> (precompile) with dynamic updates "disabled" so that there's no need for any
> compilation on the fly at all.
Hello.
I have designed web services too and testing one from multiple sources
at random times can show this slowness as the web service needs to be
restarted. In addition to deployment settings, other ways exist to
have quick response times.
A Web service is like a web page in that after the webmethod has
finished, the parent thread will remove the web service after web
method call and especially after the timeout period is reached on web
server setting.
The other ways to increase performance and In no particular order,
1). If you want the results from the web method returned quickly on the
next caller (< 10 minutes), add and adjust the "CacheDuration"
attribute to the web method like this
<WebMethod (CacheDuration:=600)>
string[] GetSomeData(int someId)
2). Enable session and increase session time out for the web service.
2.a). Enabling session state for the web service (in web.config) can
help too. Fastest setting is the default mode of "inproc" with the
tradeoff of fault tolerance as the session is "in process" and local to
the web server running the web service.
3. This next option is more work but it will always keep the web
service running on the web server. Call it from another application
periodically (ie; service or a local application periodically calling
it.)
Hope this helps too