Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does IIS on Azure Web Roles need to recompile ASP.NET apps so often?

I have ASP.NET applications deployed on a number of different environments (AppHarbor, Azure, DiscountASP.NET, GoDaddy, etc...) and one thing that bothers me with my deployments on Azure is that my low-traffic websites get JIT-compliled if there hasn't been a request for more than a couple of hours.

Obviously I could solve this by increasing the amount of traffic to my site (I'm being facetious) or by trying to do some hacky things with precompilation, but I'd rather understand why the site needs to be compiled constantly in Azure. I've never noticed this issue on other providers (even GoDaddy) for low-traffic sites - is there some reason for this, and is there anything I can do in the Azure config files to stop this?

like image 269
Aaronontheweb Avatar asked May 06 '11 00:05

Aaronontheweb


1 Answers

Bump your app pool timeout settings with a web role startup task. Steve Marx has a post on how to do this in Azure. You can login with remote desktop to change this to verify - but that setting would get blown away next time you deploy.

On other environments, the app pool settings are probably configured differently. This bugged me for a while when I first set up my Azure site.

like image 128
bkaid Avatar answered Sep 20 '22 18:09

bkaid