Web service slow on first call? In memory or cache option for web service?

Discussion in 'ASP .Net Web Services' started by RJ, Sep 21, 2005.

  1. RJ

    RJ Guest

    I'm fairly new to web services, but I think I understand that they operate
    in a stateless manner by design. It seems that there is a delay the first
    time you call the web service methods, or call them after some period of
    inactivity. I'm guessing there is creation of some proxy which takes time,
    and is flushed out of memory if it is inactive for some time. This delay
    time makes the overall throughput time unacceptable.

    Is there a way to code, tune or configure to avoid this behavior, and get
    quick response on all calls? Thanks.

    RJ
     
    RJ, Sep 21, 2005
    #1
    1. Advertising

  2. RJ

    Luca Morelli Guest

    may be that first time webservice is executed that just in time compiler
    start and compile in native code.

    "RJ" <> ha scritto nel messaggio
    news:eU%...
    > I'm fairly new to web services, but I think I understand that they operate
    > in a stateless manner by design. It seems that there is a delay the
    > first
    > time you call the web service methods, or call them after some period of
    > inactivity. I'm guessing there is creation of some proxy which takes
    > time,
    > and is flushed out of memory if it is inactive for some time. This delay
    > time makes the overall throughput time unacceptable.
    >
    > Is there a way to code, tune or configure to avoid this behavior, and get
    > quick response on all calls? Thanks.
    >
    > RJ
    >
    >
     
    Luca Morelli, Sep 21, 2005
    #2
    1. Advertising

  3. RJ

    Jack Li Guest

    In that case you may want to use ngen.exe to precompile it.

    Regards,
    Jack Li
    MVP (ASP.NET)

    "Luca Morelli" <> wrote in message
    news:%...
    > may be that first time webservice is executed that just in time compiler
    > start and compile in native code.
    >
    > "RJ" <> ha scritto nel messaggio
    > news:eU%...
    >> I'm fairly new to web services, but I think I understand that they
    >> operate
    >> in a stateless manner by design. It seems that there is a delay the
    >> first
    >> time you call the web service methods, or call them after some period of
    >> inactivity. I'm guessing there is creation of some proxy which takes
    >> time,
    >> and is flushed out of memory if it is inactive for some time. This delay
    >> time makes the overall throughput time unacceptable.
    >>
    >> Is there a way to code, tune or configure to avoid this behavior, and get
    >> quick response on all calls? Thanks.
    >>
    >> RJ
    >>
    >>

    >
    >
     
    Jack Li, Sep 22, 2005
    #3
  4. RJ

    Peter Kelcey Guest

    Re: Web service slow on first call? In memory or cache option for web service?

    The JIT can occur more than just the first time the webservice is hit
    by your client. The JIT compiler only compiles the code into memory and
    not to disc. Therefore, all compiled code is lost every time the
    worker process is terminated. Your worker process is likely configured
    to timeout if it is idle for more than 20 minutes.

    Your high overhead after a perioud of inactivity is probably due to the
    JIT running AND the worker process itself having to load.

    You can avoid this behaviour by modifying your IIS settings to increase
    the standard 20 minute timeout.

    Peter Kelcey
     
    Peter Kelcey, Sep 22, 2005
    #4
  5. RJ

    Brock Allen Guest

    The reason your app is slow upon first request is not because of compilation
    but because the appDomain is being loaded.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen

    > In that case you may want to use ngen.exe to precompile it.
    >
    > Regards,
    > Jack Li
    > MVP (ASP.NET)
    > "Luca Morelli" <> wrote in message
    > news:%...
    >
    >> may be that first time webservice is executed that just in time
    >> compiler start and compile in native code.
    >>
    >> "RJ" <> ha scritto nel messaggio
    >> news:eU%...
    >>
    >>> I'm fairly new to web services, but I think I understand that they
    >>> operate
    >>> in a stateless manner by design. It seems that there is a delay
    >>> the
    >>> first
    >>> time you call the web service methods, or call them after some
    >>> period of
    >>> inactivity. I'm guessing there is creation of some proxy which
    >>> takes
    >>> time,
    >>> and is flushed out of memory if it is inactive for some time. This
    >>> delay
    >>> time makes the overall throughput time unacceptable.
    >>> Is there a way to code, tune or configure to avoid this behavior,
    >>> and get quick response on all calls? Thanks.
    >>>
    >>> RJ
    >>>
     
    Brock Allen, Sep 22, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    3,087
  2. Gabriel Genellina
    Replies:
    1
    Views:
    581
    Rafal Gulinski
    Nov 5, 2009
  3. Carlos Hernandez

    Webservice very slow on first call

    Carlos Hernandez, Sep 12, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    170
    Ken Cox [Microsoft MVP]
    Sep 13, 2004
  4. Marlene A. Roman

    Web Service request slow the first time

    Marlene A. Roman, Sep 22, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    205
    Marlene A. Roman
    Sep 22, 2006
  5. Replies:
    7
    Views:
    276
Loading...

Share This Page