qqqxbg
Last Updated: February 25, 2016
·
1.486K
· deathbysharept

Workaround for AppHarbor's 20 minute app pool recycling

AppHarbor is an amazing service put in place for .Net developers. Free single processor web instances, built-in SSL, continuous builds with unit testing, and git deployment. One big downside to their service, however, is that their servers will recycle the app pools after 20 minutes of inactivity.

This does two negative things to your website.

1) It will timeout any user sessions regardless of what you specify the default timeout to be (again this assumes they're inactive for at least 20 minutes)

2) It will unload the application completely so that when a user goes to your website, it has to go through all of the initial application load and startup events all over again (for my site this would usually take up to 15 seconds until the page responded).

I found a free site monitoring tool called StatusCake that I'm now happily using to ping my website in 15 minute intervals.

Picture

I also tried out StillAlive which is an official AppHarbor addon that is free with limited functionality. The main problem being it only allows you to make a call every 4 hours under the free plan.

Monitor.us is another free service that has tons of features that I looked into. What I found was that StatusCake was a lot simpler to setup and manage. Also, the lowest interval I remember seeing was 30 minutes but I could be wrong.