Options

2009SP1 Webservices slow response on first request

kfuglsangkfuglsang Member Posts: 26
edited 2010-09-30 in NAV Three Tier
Hi all,

I have been developing a test solution based on the 2009 SP1 webservices. My findings are, however, that the first request to the webservices takes about 5 seconds to get a response no matter the response size. Any subsequent request is finished relatively quickly (means reasonably, what I would expect).

The webservices is requested through a .net application. If I let an amount of time, say 20 minutes, pass it will take 5 seconds to do the first request again.

Regarding this, I think it would be very interesting to know if anyone else has experienced this?
Any ideas to how I can avoid this "initialization time"?

Comments

  • Options
    kinekine Member Posts: 12,562
    I know this behavior from IIS applications, where the worker process is killed after given time (I think that 20 minutes is default). It looks same for WCF. But I do not know how to set this in WCF... (similar problem like e.g. there: http://www.netframeworkdev.com/windows- ... 3818.shtml)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    kfuglsangkfuglsang Member Posts: 26
    Sounds correct yes.

    I will check tomorrow if I can find a way to tweak the recycling settings for the NAV webservices, although I have a feeling they might be hidden pretty well :/
  • Options
    kinekine Member Posts: 12,562
    As workaround you can use some scheduler to run some call for the webservice in given period to just keep the webservice "warm".
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    Jens_M-PJens_M-P Member, Microsoft Employee Posts: 39
    The webservice will reuse a previously used connection if another request for the same user comes in within a given time period (in 2009 SP1). As far as I remember this period is set to 10 seconds.
    The main reason for reusing the connection is that the database connection then does not need to be re-established.

    Hope this helps.
    Best regards,
    Jens Møller-Pedersen [MSFT]

    This posting is provided 'AS IS' with no warranties, and confers no rights.
  • Options
    kfuglsangkfuglsang Member Posts: 26
    Unfortunately it doesnt really help.

    The application isn't much loaded given the nature of it, so each user will get the experience that it opens very slowly.

    I have created a small vb-script to query the webservice every 10 minutes, but to be honest I hope another solution will appear.
Sign In or Register to comment.