« Previous Next »

Answered Thread: Application pool recycling

Last post 07-14-2009 11:02 AM by bapo_10@hotmail.com. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-14-2009, 9:32 AM

    Application pool recycling

    So i try again and hopefully understand a little more.

     Problem: My application sits in shared web space. My web service provider is re-cycling the application every 20 Minutes or so - viz/.

    HostingEnvironment initiated shutdown HostingEnvironment caused shutdown at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() Local Time: 7/14/2009 7:33:47 AM

    I am connected to a third party server and when the application pool recycles the connection is lost. The application makes realtime decisions and must always remain connected to the third party server. Application_End gets fired when the recycle occurs but I can't see a way of running code or bringing the site back up again in its historical state without hitting the web site with a browser request and firing Application_Start. Does anybody know how to solve this problem please.

     

    Robert

  • 07-14-2009, 10:06 AM In reply to

    Re: Application pool recycling

    Hi,

    Are you sure your service provider are actively recycling the application pool every 20 minutes, or is it just unloading after 20 minutes of idle time (which is the default behaviour for IIS 6.0) ?

    If its the latter, then all you need to do is schedule some job somewhere which pings your application and effectively acts as a keep-alive for it.

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 07-14-2009, 10:30 AM In reply to

    Re: Application pool recycling

    1. Thanks for the response. Yes I've been looking at this and it appears that it is idle and they are shutting it down after this time period.
    2. Do you know is there a way to schedule a job on the server to do a similar thing to a ping. I was hoping to keep a third machine out of it. this is the reason I wrote it as a web site (my physical mobility world wide).
  • 07-14-2009, 10:40 AM In reply to

    Answered Re: Application pool recycling

    Hi,

    Yes, the simplest way to do this is to schedule a task on the web server to make a call to a URL which keeps the application pool 'warmed up'. I do this using Tinyget from the IIS Resource Kit tools :

    http://support.microsoft.com/kb/840671#12

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 07-14-2009, 11:02 AM In reply to

    Re: Application pool recycling

    Ok - Thanks I'll check it out.

    So if I understand correct the application domain is being shut down (Which I think I catch in Application_End), and won't come up again until a page is hit?

Page 1 of 1 (5 items)
Microsoft Communities