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.
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.
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)
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.
Related
We are moving a range of Cloud services Web Roles to Azure websites - currently running on App Service plan/pricing tier - Standard 1 medium.
The websites are all identical and at some point we will re-write out code base to be properly multi-tenanted. However we are currently hosting them as multiple websites on a single Azure web hosting plan.
In terms of memory usage will Azure share the identical Dlls e.g. all the Nuget packages/core application Dll? Or do we need enough memory to load a copy of each Dll per websites? Effectively I am hoping to share you can share common assemblies across AppPools.
I have seen mention of settings that MS was adding to IIS to support better density for shared hosting providers. I believe .Net 4.5 added support for interned Dll. Are there any settings etc that affect how Azure handles this situation? We are currently running at 94% memory consumption of our 3.5GB and wanted to understand whether we would need to scale up soon. I would hope Azure would be able to do something under the covers as obviously MS want to maximize density.
Each WebApp is isolated by the app-pool so if you have multiple copies of the same site, even if they are identical, they will all load their own copy of the assembly into memory.
There is also the security sandbox due to the multitenant nature of the service so interning will not work against that.
To monitor memory usage, you can look at the app service plan. Also useful is process explorer (WebApp>tools>process explorer)
We have set up 40 sites on 4 different hosting plans. One of the plans has very high memory use even though it only has 9 sites, but I can't see which 9 sites this plan contains!
In addition, though I can see the overall memory use for the plan, is there any way to tell which site is using all the memory?
Two part answer:
To see which sites are under which plan, browse to the Web Hosting Plan in the preview portal (portal.azure.com).
To see the memory used by a given site you can go to that site's kudu portal (located at http://.scm.azurewebsites.net) and log in with your Microsoft credentials. Click on the Process Explorer tab. Now you'll see all the processes running in that site and exactly how much memory each of them is taking.
You can also see memory usage in the preview portal but the kudu portal will give you better details as to what's going on
In Visual Studio 2013, I have a solution that holds several projects, including multiple class libraries, as well as an MVC5 project to serve HTML pages to clients.If I get the free tier, can I host my entire solution, including all the projects that it holds? Microsoft's own documentation on this matter is not clear, and I was hoping someone here has already used the Azure platform for hosting their website.
Does Microsoft's Azure Hosting allow the hosting of n-tier applications?
Sure, why not? You can host every tier of your application separatly in Azure (DBs, web sites, services, background jobs, etc.) in different services provided by Azure. In the free tier you have the limitation of sites you can create for free (Azure Web Sites), limitation of cores (don't know the exact limit) and the costs you produce. If your costs exceeds the limit all of your resources will be shut down.
I have a small Orchard website that I'm hosting on Windows Azure. This website is currently configured to use a FREE web site instance. I've noticed that the first time the site is accessed after a 20-30 minute period, it takes a while (>5 seconds) to load. After that initial load, I can revisit the site, and its fast. I suspect that the app pool is recycling fairly often as its a FREE Azure Web Site instance.
I need this site to load as fast as possible. I'm not opposed to using a different Azure option. I'm just not sure what I should be using.
1) Is there a way in my Orchard site's web.config file to set how often the app pool is recycled? I really need this site to be quick.
2) If I use a "SHARED" Web Site instance, will this get me past the recycling issue?
3) Or, do I need a "RESERVED" Web site instance.
My main goal here is to cost-effectively meet my goal of loading my web site quickly after it hasn't been accessed in a while. I'm just not sure what I can/should do.
Thank you!
I use a combination of the following for performance issues:
I enable Keep Alive module
I enable Warmup module and in Performance settings add my most visited pages
I manually set machine key inside web.config so that sessions last regardless of recycling - this could be an issue if there's not enough memory allocated for the web site inside the IIS
These steps are not related specifically to Azure, but rather to any kind of hosting. Especially when using Azure shared web site instances since they're nothing more than a shared hosting (unlike Azure cloud services)..
Azure web role can easily be made to be fast and avoid the appPool recycle issues, so consider that your plan B after trying all options with Azure websites.
I haven't tried with Azure websites, so it may or may not be possible there. Info is vague as to whether or not you can configure the idle timeout setting for a reserved instance. One thing you can try is to use the warm-up feature (dashboard -> performance). This should periodically load some pages, which would prevent idle timeout of the appPool. You might also try external services like pingdom.com or something similar that would periodically ping your site to prevent it from recycling.
If you end up switching to web roles, you will definitely be able to do this. The latest Orchard builds (v1.6+) set the appPool idle timeout to 0 (never timeout) by default. You will in general get a lot more control over performance and other configuration if you use web role rather than azure websites. The main drawback with this choice is you lose some of the deployment options, and deployments take a lot longer (they are still easy, they just take a while).
I am stuck with the question if a Web Service implemented in Windows Azure have to run in a Web role, or is it possible to have it run in a Worker role ? If so, is there an alternative way to monitor the http-traffic, because a Worker role don't give access to the IIS logs ?
BR/Christer
You can run your web services in a Worker Role via ServiceHost (you can also run them with ServiceHost in a Web Role if you wanted). By default, IIS isn't activated in a Worker Role, which is why you don't have IIS logs.
There are several WCF performance counters you could look at, but you probably need to look at networking performance counters for byte-level details.
EDIT: To address question of how to access performance counters: using Remote Desktop should be reserved for debugging purposes. Instead, it's better to collect performance counters with the Diagnostic Monitor, then publish them to Windows Azure Table storage for external access. See this article for a quick intro to Windows Azure and performance counters. The article shows how to manually query the performance counters (which get published to WADPerformanceCountersTable). You can also view this table through Visual Studio (once you install the Windows Azure tools), or through 3rd-party tools such as Cerebrata Azure Diagnostics Manager.