Disabled Idle Timeouts, still timing out after 20 minutes

Discussion in 'ASP .Net' started by =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?=, Aug 15, 2006.

  1. On IIS 6, I've disabled idle timeouts and any app pool recycling other than
    the 29 hour timed recycle.

    I've disabled both on the app pool itself and on all app pools at the server
    level. I've restarted IIS as well.

    After 20 minutes of inactivity, sites are still being shut down. Going by
    the logs, there is a time stamp if the idle time is greater than 18 or so
    minutes.

    Is there any where else that could possibly override this setting?

    --
    Stefan Barlow
    MCSD.Net
    =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?=, Aug 15, 2006
    #1
    1. Advertising

  2. see machine.config

    -- bruce (sqlwok.com)

    "Stefan Barlow" <> wrote in message
    news:...
    > On IIS 6, I've disabled idle timeouts and any app pool recycling other
    > than
    > the 29 hour timed recycle.
    >
    > I've disabled both on the app pool itself and on all app pools at the
    > server
    > level. I've restarted IIS as well.
    >
    > After 20 minutes of inactivity, sites are still being shut down. Going by
    > the logs, there is a time stamp if the idle time is greater than 18 or so
    > minutes.
    >
    > Is there any where else that could possibly override this setting?
    >
    > --
    > Stefan Barlow
    > MCSD.Net
    bruce barker \(sqlwork.com\), Aug 15, 2006
    #2
    1. Advertising

  3. Bruce,

    Thanks for the response.

    I see idleTimeout in processModel is set to Infinite. However, I'm not
    running in isolation mode, so I think that the processModel area isn't used
    in this case?

    Is there somewhere else in the machine.config I should be looking?

    Thank you, this has been driving me crazy all day.

    --
    Stefan Barlow
    MCSD.Net


    "bruce barker (sqlwork.com)" wrote:

    > see machine.config
    >
    > -- bruce (sqlwok.com)
    >
    > "Stefan Barlow" <> wrote in message
    > news:...
    > > On IIS 6, I've disabled idle timeouts and any app pool recycling other
    > > than
    > > the 29 hour timed recycle.
    > >
    > > I've disabled both on the app pool itself and on all app pools at the
    > > server
    > > level. I've restarted IIS as well.
    > >
    > > After 20 minutes of inactivity, sites are still being shut down. Going by
    > > the logs, there is a time stamp if the idle time is greater than 18 or so
    > > minutes.
    > >
    > > Is there any where else that could possibly override this setting?
    > >
    > > --
    > > Stefan Barlow
    > > MCSD.Net

    >
    >
    >
    =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?=, Aug 15, 2006
    #3
  4. To clarify, I have a site that takes about 8-10 seconds to start up, so I
    don't ever want the site to idle shutdown.

    Even after disabling the idle shutdown, I can view a page, then wait 20
    minutes and view another page, and the IIS log inserts the startup header and
    the page takes 8-10 seconds to load. Refreshing takes < .2 seconds. There
    isn't anything in the event logs to signify an app shutdown or startup at any
    time.

    --
    Stefan Barlow
    MCSD.Net
    =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?=, Aug 15, 2006
    #4
  5. Hello Stefan,

    From your description, your ASP.NET application has a long startup
    time(some intialization work) and you want to make the application avoid
    automatically shutdown/stop(avoid the intialiation overhead).

    As you mentioned that you've configured all the timeout setting for the IIS
    application pool, do you mean you've unchecked the following options for
    the IIS application pool?

    * Recycle worker process (in minutes):
    * Shutdown worker processes after being idle for (time in minutes)

    If so, the automatic shutdown or recycle of the worker process should have
    been disabled.

    Based on my experience, if you find that the ASP.NET application page
    respond slowly again(like at initializing, startup time), it is possibly
    caused by either of the following issue:

    1. the ASP.NET worker process recycled or shutdown.

    2. the ASP.NET application(appdomain) restart itself without recycle or
    shutdown the workerprocess.

    And for IIS worke process shutdown, there should contains log entry in the
    application eventlog which record the shutdown or recycle behavior. Have
    you found any entry in the application eventlog indicate the the ASP.NET
    application's worker process recycled? As for application restart, I
    suggest you consider put some code in your ASP.NET application's
    "Applcation_Start" or "Application_End" event (in global.asax) and write
    some info into EventLog to trace the application restart behavior. Here is
    a good article from ScottGu's blog describing how to write custom event
    entry to record ASP.NET application shutdown.


    #Logging ASP.NET Application Shutdown Events
    http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx

    Here is a web kbalerts listed some existing problem of ASP.NET application
    restart:

    #Why is my ASP.NET application restarting?
    http://www.kbalertz.com/Feedback_871042.aspx

    Hope this helps. Please feel free to let me know if there is any other
    information you wonder.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Aug 16, 2006
    #5
  6. Steven,

    Thank you for the response. I have disabled recycling based on time and
    idle. I also turned on logging for all recycle events and restarted IIS.

    I attached a debugger and I can see that my Application_OnStart event is NOT
    being called again on the mysterious recycle. I do see the pages being
    recompiled in the debug though.

    There are also no events being logged to the event log.

    The only detail is an increase in load time for the first request after the
    20 minute wait (debug output showed compilation happening) and the Header
    stamp in the IIS log file.


    --
    Stefan Barlow
    MCSD.Net
    =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?=, Aug 16, 2006
    #6
  7. Hello Stefan,

    Thanks for your reply.

    I've discussed with some other engineers, as for the following things:

    ==============
    (debug output showed compilation happening) and the Header stamp in the IIS
    log file.
    ==============

    Would you provide some detailed content of teh output and "header stamp" to
    us?

    If the application pages are really recompiled without application
    restarting, I think it is likely cause by some of the following things:

    1. Any of the page source file or aspx content file has been modified(or
    any of its dependencies/assemblies in bin dir has been modified)

    2. Is there any anti-virus software on the machine which will monitoring
    the ASP.NET temporarly dir? Also, is your server updated all the lastest
    service patches? I've ever met some page recompilation issue is caused by
    some external program modified the ASP.NET appliation's dynamic compiled
    assembly or source file under Temporary ASP.NET folder.

    In addition, as for the web appilcation, have you set the <compilation
    debug="xx" /> attribute to "false" so that the pages will be batch compiled
    under release mode. If you haven't set it to release mode, you can set the
    attribute to false to see whether it helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Aug 17, 2006
    #7
  8. Steven,

    We had debug=true on until a few days ago. I did an IISRESET after turning
    it off. The last few times we tried we are no longer seeing the asseblies
    being loaded in debug after the 20 minutes.

    I just viewed the page again and it took 5.6 seconds to build the page.
    This count is the entire time from BeingRequest to EndRequest, and can be
    pre-empted by Application_Start.

    Viewing trace.axd afterwards showed pages going back until 12:30am
    yesterday, and from what I understand, this list is cleared when an
    application recycles?

    The header I refered to is the following entry in the middle of the IIS log
    file:
    #Software: Microsoft Internet Information Services 6.0
    #Version: 1.0
    #Date: 2006-08-17 14:36:27
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port
    cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus
    sc-win32-status sc-bytes cs-bytes

    Thank you!
    --
    Stefan Barlow
    MCSD.Net


    "Steven Cheng[MSFT]" wrote:

    > Hello Stefan,
    >
    > Thanks for your reply.
    >
    > I've discussed with some other engineers, as for the following things:
    >
    > ==============
    > (debug output showed compilation happening) and the Header stamp in the IIS
    > log file.
    > ==============
    >
    > Would you provide some detailed content of teh output and "header stamp" to
    > us?
    >
    > If the application pages are really recompiled without application
    > restarting, I think it is likely cause by some of the following things:
    >
    > 1. Any of the page source file or aspx content file has been modified(or
    > any of its dependencies/assemblies in bin dir has been modified)
    >
    > 2. Is there any anti-virus software on the machine which will monitoring
    > the ASP.NET temporarly dir? Also, is your server updated all the lastest
    > service patches? I've ever met some page recompilation issue is caused by
    > some external program modified the ASP.NET appliation's dynamic compiled
    > assembly or source file under Temporary ASP.NET folder.
    >
    > In addition, as for the web appilcation, have you set the <compilation
    > debug="xx" /> attribute to "false" so that the pages will be batch compiled
    > under release mode. If you haven't set it to release mode, you can set the
    > attribute to false to see whether it helps.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    >
    =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?=, Aug 17, 2006
    #8
  9. Thanks for your reply Stefan,

    Sorry for the late response due to a sudden sickness last weekend :(.

    So you've found the page's recompilation behaves different after you turn
    off the <compilation debug="xxx"/> and reset IIS? As for the <compilation
    debug="xx" /> setting, we always recommend that we turn it off(set it as
    release) mode when we deploy application in production environment(or
    simulate the production environment testing).

    When under release mode, the ASP.NET runtime will perform batch compilation
    against the pages in web appilcation. This means the runtime compiler will
    batch compile pages/usercontrols as much as possible (not only the one was
    requested by client, this the behavior under debug mode). And there are
    some other behaviors different from debug and release mode in ASP.NET
    application. For example, the httpRunTime's maxRequestTimeout setting will
    only work when the application is under release mode....

    As for the "trace.axd", you're right that the trace record is stored in a
    buffer which will be cleared automatically when the application instance
    restart(we can also manually clear it). It is the
    "System.Web.Handlers.TraceHandler" class which handles the request against
    "Trace.axd" in each ASP.NET web application.

    If there is any other information you wonder, please feel free to let me
    know.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Aug 22, 2006
    #9
    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. Andy Green
    Replies:
    3
    Views:
    536
    Alvin Bruney
    Jan 10, 2004
  2. =?Utf-8?B?SmFzb24=?=

    forms authentication timeouts and session timeouts

    =?Utf-8?B?SmFzb24=?=, Jun 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    449
    =?Utf-8?B?SmFzb24=?=
    Jun 22, 2004
  3. enahar
    Replies:
    8
    Views:
    2,020
    Patrick Olurotimi Ige
    Mar 8, 2005
  4. =?Utf-8?B?RWQgQ2hpdQ==?=

    ASP.Net application session timeouts in 20 minutes

    =?Utf-8?B?RWQgQ2hpdQ==?=, May 4, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    420
    =?Utf-8?B?RWQgQ2hpdQ==?=
    May 4, 2005
  5. Serge

    Session timing out after 20 minutes

    Serge, Apr 13, 2006, in forum: ASP .Net Security
    Replies:
    0
    Views:
    166
    Serge
    Apr 13, 2006
Loading...

Share This Page