HTTPApplication behavior.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AinO

    HTTPApplication behavior.

    Hi,

    - I've created a webservice in VS2003/c# wich relies heavily on cache. It
    has a cache manager wich loads
    resources (triggered by requests) and wich has also a built in timer wich
    triggers every 5 mins a check on
    the unused lifetime of all cached resources and frees them if they exceed
    their idle time limit. I made also a
    log object wich logs HTTP application level (triggered from global.asax) and
    web method level events (triggered
    from the various webmethods). From the results of this log i'm fine tuning
    the behavior of my cache manager. -

    This works quite well, but i don't understand fully the behavior of a
    HTTPApplication and i think it is the key to
    understand and counter following problems :

    1. When VS loads my project and connects to the web service IIS starts up an
    HTTPApplication , and it
    generates an application error event. Is this normal (to ignore) ?

    2. My service is heavily used at office hours. So at 9am users starts to hit
    it. At that time my cache
    manager is very busy loading resources and it takes about 2 minutes before
    the first user can comfortably work
    with his client. Is it possible to wake a service at server side (i
    considered building a small client wich wakes
    the service at 8.45am and 12.45pm (end of lunchbreak) but i don't like the
    idea because i prefer compact system architectures) ?

    3. I notice the HTTPApplication class instance gets shuts down daily (a
    while after the last request) twice. Maybe
    there is a way to prevent this (wich makes 2. obsolete) ?

    I'm aware these issues may relate more to fine tuning IIS then to .NET/c#
    but i can't find any good directions...

    Thanks in advance for your comments,

    AinO.


  • Peter Bromberg [C# MVP]

    #2
    Re: HTTPApplication behavior.

    AinO,
    Regarding your Application error event, without knowing what exactly the
    even is, I'd be guessing. Perhaps somebody else could expand on it.

    As far as "waking up" the service is concerned, you could have a simple VBS
    script that runs from Task Scheduler that makes the required request to get
    everything going, before business hours.

    Addressing the third issue, you could run the IISState tool to create a dump
    that would provide more insight into what and from where your application is
    quitting.

    Hope the above gives some ideas.

    --Peter

    "AinO" <no.spam@please .com> wrote in message
    news:rp5me.1038 80$e85.6123621@ phobos.telenet-ops.be...[color=blue]
    > Hi,
    >
    > - I've created a webservice in VS2003/c# wich relies heavily on cache. It
    > has a cache manager wich loads
    > resources (triggered by requests) and wich has also a built in timer wich
    > triggers every 5 mins a check on
    > the unused lifetime of all cached resources and frees them if they exceed
    > their idle time limit. I made also a
    > log object wich logs HTTP application level (triggered from global.asax)
    > and
    > web method level events (triggered
    > from the various webmethods). From the results of this log i'm fine tuning
    > the behavior of my cache manager. -
    >
    > This works quite well, but i don't understand fully the behavior of a
    > HTTPApplication and i think it is the key to
    > understand and counter following problems :
    >
    > 1. When VS loads my project and connects to the web service IIS starts up
    > an
    > HTTPApplication , and it
    > generates an application error event. Is this normal (to ignore) ?
    >
    > 2. My service is heavily used at office hours. So at 9am users starts to
    > hit
    > it. At that time my cache
    > manager is very busy loading resources and it takes about 2 minutes before
    > the first user can comfortably work
    > with his client. Is it possible to wake a service at server side (i
    > considered building a small client wich wakes
    > the service at 8.45am and 12.45pm (end of lunchbreak) but i don't like the
    > idea because i prefer compact system architectures) ?
    >
    > 3. I notice the HTTPApplication class instance gets shuts down daily (a
    > while after the last request) twice. Maybe
    > there is a way to prevent this (wich makes 2. obsolete) ?
    >
    > I'm aware these issues may relate more to fine tuning IIS then to .NET/c#
    > but i can't find any good directions...
    >
    > Thanks in advance for your comments,
    >
    > AinO.
    >
    >[/color]


    Comment

    • Alvin Bruney [MVP - ASP.NET]

      #3
      Re: HTTPApplication behavior.

      the application object will shut down after inactivity, for health reasons,
      you should accept that behavior and not muck with it. follow bromberg's
      advice and write an application warmer that fires every so often to keep the
      application nice and toasty. .net 2.0 fixes this problem with some
      specialized tools by the way

      --
      Regards,
      Alvin Bruney - ASP.NET MVP

      [Shameless Author Plug]
      The Microsoft Office Web Components Black Book with .NET
      Now available @ www.lulu.com/owc, Amazon.com etc
      "Peter Bromberg [C# MVP]" <pbromberg@yaho o.com> wrote in message
      news:e38qdE%23Y FHA.612@TK2MSFT NGP12.phx.gbl.. .[color=blue]
      > AinO,
      > Regarding your Application error event, without knowing what exactly the
      > even is, I'd be guessing. Perhaps somebody else could expand on it.
      >
      > As far as "waking up" the service is concerned, you could have a simple
      > VBS script that runs from Task Scheduler that makes the required request
      > to get everything going, before business hours.
      >
      > Addressing the third issue, you could run the IISState tool to create a
      > dump that would provide more insight into what and from where your
      > application is quitting.
      >
      > Hope the above gives some ideas.
      >
      > --Peter
      >
      > "AinO" <no.spam@please .com> wrote in message
      > news:rp5me.1038 80$e85.6123621@ phobos.telenet-ops.be...[color=green]
      >> Hi,
      >>
      >> - I've created a webservice in VS2003/c# wich relies heavily on cache. It
      >> has a cache manager wich loads
      >> resources (triggered by requests) and wich has also a built in timer wich
      >> triggers every 5 mins a check on
      >> the unused lifetime of all cached resources and frees them if they exceed
      >> their idle time limit. I made also a
      >> log object wich logs HTTP application level (triggered from global.asax)
      >> and
      >> web method level events (triggered
      >> from the various webmethods). From the results of this log i'm fine
      >> tuning
      >> the behavior of my cache manager. -
      >>
      >> This works quite well, but i don't understand fully the behavior of a
      >> HTTPApplication and i think it is the key to
      >> understand and counter following problems :
      >>
      >> 1. When VS loads my project and connects to the web service IIS starts up
      >> an
      >> HTTPApplication , and it
      >> generates an application error event. Is this normal (to ignore) ?
      >>
      >> 2. My service is heavily used at office hours. So at 9am users starts to
      >> hit
      >> it. At that time my cache
      >> manager is very busy loading resources and it takes about 2 minutes
      >> before
      >> the first user can comfortably work
      >> with his client. Is it possible to wake a service at server side (i
      >> considered building a small client wich wakes
      >> the service at 8.45am and 12.45pm (end of lunchbreak) but i don't like
      >> the
      >> idea because i prefer compact system architectures) ?
      >>
      >> 3. I notice the HTTPApplication class instance gets shuts down daily (a
      >> while after the last request) twice. Maybe
      >> there is a way to prevent this (wich makes 2. obsolete) ?
      >>
      >> I'm aware these issues may relate more to fine tuning IIS then to .NET/c#
      >> but i can't find any good directions...
      >>
      >> Thanks in advance for your comments,
      >>
      >> AinO.
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • AinO

        #4
        Re: HTTPApplication behavior.

        Thanks Peter and Alvin for the info, i will go for the scheduled VBS ...

        AinO.


        "Peter Bromberg [C# MVP]" <pbromberg@yaho o.com> wrote in message
        news:e38qdE#YFH A.612@TK2MSFTNG P12.phx.gbl...[color=blue]
        > AinO,
        > Regarding your Application error event, without knowing what exactly the
        > even is, I'd be guessing. Perhaps somebody else could expand on it.
        >
        > As far as "waking up" the service is concerned, you could have a simple[/color]
        VBS[color=blue]
        > script that runs from Task Scheduler that makes the required request to[/color]
        get[color=blue]
        > everything going, before business hours.
        >
        > Addressing the third issue, you could run the IISState tool to create a[/color]
        dump[color=blue]
        > that would provide more insight into what and from where your application[/color]
        is[color=blue]
        > quitting.
        >
        > Hope the above gives some ideas.
        >
        > --Peter
        >
        > "AinO" <no.spam@please .com> wrote in message
        > news:rp5me.1038 80$e85.6123621@ phobos.telenet-ops.be...[color=green]
        > > Hi,
        > >
        > > - I've created a webservice in VS2003/c# wich relies heavily on cache.[/color][/color]
        It[color=blue][color=green]
        > > has a cache manager wich loads
        > > resources (triggered by requests) and wich has also a built in timer[/color][/color]
        wich[color=blue][color=green]
        > > triggers every 5 mins a check on
        > > the unused lifetime of all cached resources and frees them if they[/color][/color]
        exceed[color=blue][color=green]
        > > their idle time limit. I made also a
        > > log object wich logs HTTP application level (triggered from global.asax)
        > > and
        > > web method level events (triggered
        > > from the various webmethods). From the results of this log i'm fine[/color][/color]
        tuning[color=blue][color=green]
        > > the behavior of my cache manager. -
        > >
        > > This works quite well, but i don't understand fully the behavior of a
        > > HTTPApplication and i think it is the key to
        > > understand and counter following problems :
        > >
        > > 1. When VS loads my project and connects to the web service IIS starts[/color][/color]
        up[color=blue][color=green]
        > > an
        > > HTTPApplication , and it
        > > generates an application error event. Is this normal (to ignore) ?
        > >
        > > 2. My service is heavily used at office hours. So at 9am users starts to
        > > hit
        > > it. At that time my cache
        > > manager is very busy loading resources and it takes about 2 minutes[/color][/color]
        before[color=blue][color=green]
        > > the first user can comfortably work
        > > with his client. Is it possible to wake a service at server side (i
        > > considered building a small client wich wakes
        > > the service at 8.45am and 12.45pm (end of lunchbreak) but i don't like[/color][/color]
        the[color=blue][color=green]
        > > idea because i prefer compact system architectures) ?
        > >
        > > 3. I notice the HTTPApplication class instance gets shuts down daily (a
        > > while after the last request) twice. Maybe
        > > there is a way to prevent this (wich makes 2. obsolete) ?
        > >
        > > I'm aware these issues may relate more to fine tuning IIS then to[/color][/color]
        ..NET/c#[color=blue][color=green]
        > > but i can't find any good directions...
        > >
        > > Thanks in advance for your comments,
        > >
        > > AinO.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...