Reputation: 7692
is there a way to set the timeout of an app pool of a web-site running under azure sites.
I have a site running there and it seems like it needs to spin up again when it has been idle for a while.
Upvotes: 22
Views: 14774
Reputation: 4064
Since the relevant answer is in the comments it is easy to miss it. Currently Azure Web Apps support the Always On
feature, that keeps your app in memory. It is available in Basic
and upper tiers and you can configure it from the portal:
Resource_Group > Web App > Settings > Application settings
If you want to achieve the same effect in Free
or Shared
tiers you can create a webjob
that will ping your website to keep it in memory. There are numerous blog posts how to achieve this 1, 2, etc.
Upvotes: 19
Reputation: 229
Windows Azure Web Sites supports two modes, shared and Reserved.
In Shared mode, your web site process (w3wp) runs alongside other, sharing resources including CPU and memory. The runtime (that is Windows Azure Web Sites system) remove sites from memory after period of idleness – that is when your site doesn’t get any traffic. The runtime make the decisions removing sites, bases on many parameters, and even if you change the configuration, it may not apply, as the runtime may override that configuration.
If you are looking for your site to always be in memory, you may want to look into switching to Reserved Instance, in which your site(s) are running on their own VM(s) and the system is much more flexible in terms of resource utilization.
Yochay (PM Azure Web Sites)
Upvotes: 18
Reputation: 71031
If you're referring to the new Windows Azure Web Sites, I don't believe you have any option for controlling app pool timeout. This is a shared, managed service, where you simply upload your site, with the details of IIS etc. taken care of for you. You can look through the published management page, and you'll see that this is not an option.
Upvotes: 3