I have an IIS server hosting 40-50 ASP.Net MVC websites.
Each website has its own ApplicationPool.
When I need to restart the server for updates or config changes it takes about 3 hours for IIS to startup again. If I change each appPool to not Start Immediately IIS starts as normal and I have to go through each appPool to start them up manually. Which is a pain but it is faster.
Any Ideas why these AppPools should be taking so long to startup?
Regards
Carl
Related
I have uploaded an application to hosting, but its application pools is recycling immediately after logging in, while its is working fine on local IIS. Any common reason facing this scenario?
I need to know What are common reasons of immediately recycling of application pool in IIS using ASP.Net MVC?
iis app pool recycles on iis config file changes or based on the settings in IIS like Number of requests, memory limit, idle time, or scheduled restart. you an check the login time and event vower logs to find out why is app pool is recycling. generally is app poll does not recycle on the user login.
I'm working on an ASP.net MVC project and I noticed that when the web app gets published, IIS doesn't build a cache or anything for the views until a controller has been hit. So in other words it can take a very long time for a visitor to get the page loaded if they happen to be the first person to visit the page after the whole project gets republished.
To counter this, I'd have to manually hit every endpoint with a view in the project once. When the project first started this was a simple task but as you can imagine right now this is not maintainable.
My question is how do I execute a batch of curl commands to the endpoints with views in the project? I'm not sure where to start. Is there a programmatic way to create the batch command and append it to the AfterPublish event?
The behaviour you're encountering is due to Application Pool Start Mode in IIS. Instead of implementing AfterPublish events, you're probably better off configuring your Application Pool to do what you want it to do.
Start Mode
A few web applications take a significant amount of time to start up. IIS by default only launches a worker process when the first request for the web application is received. So for the web applications that require a longer time to initialize, users might see slow responses.
For such applications it is a good idea to launch the worker process as soon as IIS is started. The application pools have a startMode setting which when set to AlwaysRunning launches the worker process for the application pool as soon as IIS is started.
IIS 8 provides you this setting in the Application Pool Settings UI.
Source: https://blogs.msdn.microsoft.com/vijaysk/2012/10/09/iis-8-whats-new-application-pool-settings/
If you really want to run those actions after you publish the website, you'll have to learn more about the Visual Studio build process. This link can get you started: https://learn.microsoft.com/en-ca/visualstudio/msbuild/how-to-extend-the-visual-studio-build-process?view=vs-2017
IIS has to start the application again after I rebuild the website, it takes a very long time and it cuts into productivity.
I am wondering if I can somehow replace the MVC website with a small console application that listens to a port and returns a string that is then interpreted by the browser as valid html. I am not sure if this was done.
Something very lightweight.
So that it does not take 30-50 seconds on each rebuild, to see my site in action.
I want to build my app, then immediately do a request and test it and not wait almost a minute.
Is there something that does that?
There is a way to build Self-Hosted Web Api applications.
It can be console exe, or setup to run as a service.
The ASPNET engine, is designed to compile itself (views, etc), but a minute? This might be due to the weak PC, for instance.
You can use the Browser control in a windows form app. But it is not recommended, there is no way of avoiding IIS restart since your files have been changed.
I'm seeing a really strange behavior in one of my applications. It is an ASP.NET MVC application, running in IIS7. I have a very small bit of code that is running out of the context of any request (think of a basic heartbeat over a TCP socket). However, I notice that when there is no activity, the heartbeat seems to stop. If I simply make a request against the site, everything is peachy again.
So, my question is, what is the expected behavior of code running outside of any request context?
By default, IIS application pools will stop after 20 minutes of inactivity.
Configure Idle Time-out Settings for an Application Pool (IIS 7)
I have asp.net mvc intranet site that is deployed to IIS6. Site is used rarely so app pool tends to shutdown. When user click the page for the very first time 5-10 seconds are passed till page appears (app pool started and site is compiled). Situation repeats for the next page and so on. AFAIK IIS7 has option to disable App pool shutdown but IIS6 lacks it.
Nowadays i have special utility that pings site periodically (10 pages) in order to determine if pages are available and keeps site always ready for users this way.
Is it normal or may be I've missed something in IIS6 configuration? Do you use such pinger apps in production to notify support/admins if site is not available?
Thank you in advance!
You can disable application pool shutdowns on IIS 6.