Umbraco and how to prevent applicatoin pool timeout?
I am on a shared hosting plan on GoDaddy (I know horrible choice, but my client is in it now and it was a choice at the time).
I am having issues with the application pool timing out with inactivity (not a heavily viewed site yet but looks bad for me, the choice to use Umbraco by the client) and being .Net, taking al little while to start up again.
Is there a way in .Net or in Umbraco that could prevent an application timeout or speed up the process? Of course once Umbraco has been hit and the application doesn't timeout, it runs like a champ.
I looked a something like HangFire but not sure how or if using that would help. and I did see a setting for a background job in UmbracoSettings.config that turns on a background job, but I set it for every 4 minutes and the application still seems to take a while to start up after a time and seems to be doing a cold start still even with the job configured in UmbracoSettings. I am hitting a dummy HTML page.
Would adding my own applicationHost.config to the Umbraco file system supercede the IIS applicationHost.config file so I can set my own settings for the app pool?
I have their Umbraco site up and GoDaddy's settings are set so that the applicaiton pool as below and I can't change any of the setings and GoDaddy won't change any either.
As you can see the "Idle Timeout" is only 5 minutes and it is set to recycle every 29 hours (1740 minutes).
The maximum number of worker processes : 1
Idle timeout (minutes) : 5
Idle timeout action : Suspend
Maximum CPU usage (%) : 10%
Limit action : Throttle
Recycling at regular time intervals (minutes) : 1740
Recycling when the maximum number of requests is reached : Unlimited
Recycling when the maximum amount of virtual memory is used : Unlimited
Recycling when the maximum amount of private memory is used : Unlimited
As you appreciate the issue you describe is a .NET issue which, whilst not unavoidable, is a regular pain point for most.
The Umbraco background task you mention needs the application pool to be "alive" so that unfortunately isn't an option.
One option, albeit probably a paid one, is to setup a "ping" service so as to check the site every 5 minutes (or whatever time frame required). It is also a great sales pitch in terms of ensuring the site is always up and quick alerting if there are any issues with your hosting.
Pingdom seems like an interesting idea. I could see the usefulness of this.
I would like to try a diffferen't approach, but maybe a ping service for now would work. I might create my own simple ping service on my personal site to just do a simple ping test.
Yeah I have wondered about writing a ping service too, but kinda catch 22 in that your site needs to have it's application pool never go to sleep as well to ensure it works.
I guess if you are sending a regular request within the application pool timeout timeframe then it should be fine. I don't know the full technicalities of application pools, but would you need to ping your own site so that the application pool is always kept awake?
yeh, it usually is an issue on that first start up and that first customer or viewer of the site that is the issue. I guess I could have them switch hosting companies that have more flexibility, but I am not sure.
Thanks for the conversation. May not be an issue. Just a simple annoyance that could affect traffic.
Umbraco and how to prevent applicatoin pool timeout?
I am on a shared hosting plan on GoDaddy (I know horrible choice, but my client is in it now and it was a choice at the time).
I am having issues with the application pool timing out with inactivity (not a heavily viewed site yet but looks bad for me, the choice to use Umbraco by the client) and being .Net, taking al little while to start up again. Is there a way in .Net or in Umbraco that could prevent an application timeout or speed up the process? Of course once Umbraco has been hit and the application doesn't timeout, it runs like a champ.
I looked a something like HangFire but not sure how or if using that would help. and I did see a setting for a background job in UmbracoSettings.config that turns on a background job, but I set it for every 4 minutes and the application still seems to take a while to start up after a time and seems to be doing a cold start still even with the job configured in UmbracoSettings. I am hitting a dummy HTML page.
Would adding my own applicationHost.config to the Umbraco file system supercede the IIS applicationHost.config file so I can set my own settings for the app pool?
I have their Umbraco site up and GoDaddy's settings are set so that the applicaiton pool as below and I can't change any of the setings and GoDaddy won't change any either.
As you can see the "Idle Timeout" is only 5 minutes and it is set to recycle every 29 hours (1740 minutes).
Thanks in advance.
Hi Carlos
As you appreciate the issue you describe is a .NET issue which, whilst not unavoidable, is a regular pain point for most.
The Umbraco background task you mention needs the application pool to be "alive" so that unfortunately isn't an option.
One option, albeit probably a paid one, is to setup a "ping" service so as to check the site every 5 minutes (or whatever time frame required). It is also a great sales pitch in terms of ensuring the site is always up and quick alerting if there are any issues with your hosting.
https://www.pingdom.com/free might be free option worth considering
Cheers, Nigel
Thanks Nigel,
Pingdom seems like an interesting idea. I could see the usefulness of this.
I would like to try a diffferen't approach, but maybe a ping service for now would work. I might create my own simple ping service on my personal site to just do a simple ping test.
Thanks for the info.
Yeah I have wondered about writing a ping service too, but kinda catch 22 in that your site needs to have it's application pool never go to sleep as well to ensure it works.
I guess if you are sending a regular request within the application pool timeout timeframe then it should be fine. I don't know the full technicalities of application pools, but would you need to ping your own site so that the application pool is always kept awake?
Happy coding :-)
Nigel
yeh, it usually is an issue on that first start up and that first customer or viewer of the site that is the issue. I guess I could have them switch hosting companies that have more flexibility, but I am not sure.
Thanks for the conversation. May not be an issue. Just a simple annoyance that could affect traffic.
is working on a reply...