I am debugging in Visual Studio 2010 with IIS 7.5. I have four enabled AppPools. This is on my development machine, so no one else accesses it, at all.
So the problem is that three of these AppPools time out, but forth one doesn't. I am not bothered why this one stays there, but more concerned why the other three time out, as I use them more often.
I have checked all settings for them and they match exactly. I can certainly increase "Idle Time-out" settings but wanted to know what is causing it.
Thanks for your help.
Disable pinging (set Ping Enabled to false). When it's turned on, IIS hosting proces checks constantly (every 30s) if a pool process is alive. If a given application pool process does not respond withing a predefined period (Ping Maximum Response Time = 90s) it is restarted. I can't tell exactly why one pool is not restarted - maybe while debugging it was responding to IIS pings.
I couldn't figure out the reason. But as a workaround, I set "Idle Time-out (minutes" property to 60 and it is working out for me.
Related
My IIS / Apppool are behaving very weird. They keep recycling for almost every minute or even less. I suppose there is a memory leak somewhere.
The private byte: 137.756,00 (137 MB)
Virtual byte: 9.394.648,00 (9.39 GB????)
I only run about 2 websites. This is definitely not normal.
How can I fix this? Do I need to reinstall? I have tried to defrag my PC, but it did not help. I suppose that was because the memories are still being pointed by the application.
I tried to delete all my websites then deployed my application again, but it was not helping.
I remember that I force quit the "W something" process which was downloading some files from external source (trusted source). My web application was downloading through that "W something process" (I cant remember the name).
I force quit about 4-5 times, then this happens. What should I do to fix this?
Update
I tried reinstalled the IIS, but the problem is still around. When the request comes from my browser, I check the process worker:
Virtual Byte = 9.394.648,00
After just starting the app pool. If I doing some debugging in my Visual Studio using IIS Express, there is nothing wrong. There is no recycling and the application runs well.
Is there a way to reset IIS / App Pool process which hold the Virtual Byte (9 GB) to 0? I read a lot about to find some memory leak and something, but in my case it is not. I did something before which made the App Pool keep holding the 9GB virtual bytes even after the app pool recycle, it still hold 9GB virtual bytes!
So I need to know a way like clearing / cleaning / uninstalling / freeing those data hold by the Application Pool.
Update
I found this error in event viewer:
A process serving application pool 'DefaultAppPool' suffered a fatal
communication error with the Windows Process Activation Service. The
process id was '5832'. The data field contains the error number.
I installed Kentico 8.2 on my computer. But every time I turn off my computer and open it again. The Kentico Application never starts. I hope you can help me about my problem.
Your problem is not a Kentico issue at all, it's an IIS configuration issue. By default, IIS is configured to only run a website when it is first accessed manually or continually being used. If the website is idle and not running and you access it, the application pool kicks up and serves up the website. If there is idle time of 20 minutes (by default) it will go into a sleep state until it is requested again. When you restart your computer, IIS is in that sleep state until the website is first requested.
Within IIS you can set a few properties to help you out. In the Application Pool connected to your website go to the advanced properties of it. Check the General>Start Mode and ensure it is set to Always Running vs. On Demand.
Secondly, in the same Application Pool set the Process Model>Idle time-out (minutes) to something greater than the default 20 minutes. This will help only after the website is already running.
Thirdly, in the same Application Pool set the Process Model>Idle time-out action to Suspend. This will help the website start up faster when it does go to sleep.
Is autostart enabled in your IIS?
All above answers are valid, but if I remember correctly, there was also an issue with Skype taking up a specific port, if you set to "Run Skype on startup". This prevents some of the IIS services/websites to start. Not sure if that relates to your specific issue, but if you've got Skype installed and set to run on startup, try disabling this and restart your PC to see if it helped.
A test WCF webservice that I have hosted using IIS 7.5 is consistently slow to respond to calls made after a period of inactivity (i.e. the first call of each day).
From researching this topic I gather that the problem of "application warmup" is commonly encountered when using IIS (e.g. see here).
I have taken the usual steps that are recommended to try and mitigate this problem:
Installed the Application Initialization Module.
Disabled the application pool Idle Time-out, and the Regular Recycling Time Interval (i.e. set them to '0').
Edited the applicationhost.config file so that autoStart=True and startMode="alwaysRunning" for the necessary app pool, and preloadEnabled="true" for my application.
With these settings, I expect the application pool to immediately spin up a worker process when IIS is started, and spin up a new worker process when the existing one exits. Also, I expect the application to be loaded within the worker process.
However, for the first call of each day, the logs show the difference in time between the client making a call, and the webservice receiving the call, can be as much as 10 seconds. Subsequent calls are typically handled in well under 2 seconds.
Curiously, the long response time is not reproduced by making a call following an iisreset command. I would expect that such a heavy-handed operation would put the webservice in a similarly "cold" situation, however this does not seem to be the case.
I would like to know:
What could still be causing the delay in the application "warming up"?
What is the difference in the state of the webservice following iisreset and a long period of inactivity?
Should I resort to a "heart beat" solution to regularly ping the service to keep it alive?
Thanks in advance for any tips or insight.
I'll try to help with you questions:
What could still be causing the delay in the application "warming up"?
Warm up an application does not mean warm up its resources. For instance, if you configure Auto-start with Application Fabric in your WCF application (https://msdn.microsoft.com/en-us/library/ee677260(v=azure.10).aspx), and this application access database using EF, it will not initiate your DBContext.
If you want these resources initialized after your application warmed up, you need to implement a method to initialize your resources, like cache, DBContext, etc.
What is the difference in the state of the webservice following iisreset and a long period of inactivity?
When the application spend long time of inactivity, probably the application pool goes down and it is restarted when it receives any request, like a recycle does.
This link has interest information about the difference between iisreset and application pool recycle, and it can help to answer your question: https://fullsocrates.wordpress.com/2012/07/25/iisreset-vs-recycling-application-pools/
Should I resort to a "heart beat" solution to regularly ping the service to keep it alive?
If you keep on accessing your service, it will probably keep its resources initialized in memory, so can be a good approach.
Anyway, if your Application Pool is configured to recycle in some interval time, it will be recycled and your resources in memory lost.
If it looks problem to you, just turn off this feature going to IIS -> Application Pool -> Advanced settings and set Regular Time Interval=0
For this issue, it's just some suggestions, you need to make some tests and find out the better solution.
I have been trying to increase session time out in silverlight from the default timeout time.
I am setting this time in webconfig. When I try to decrease the time it works fine and session gets expired in given time. But it seems that increasing the time has no effect at all. I dont think this issue is code specific. Any suggestions?
Did you configure both client and server side config files ? Both should be consistant, otherwise it works according to lower value.
Check for configurations on this site
I would check the application pool advanced settings in IIS. There is an Idle time out and Regular Time Interval (Recycling) setting.
I have a server that gets it time reset to 7 hours in the past. When this happens forms authentication no longer works.
When I resync the time with the server time it works again.
What could be causing this? It is actually and issue for me more so then changing the time, because I don't think it will be possible to keep all the clients and the servers in sync.
You can't have a production server with jumping time. Google "Windows NTP time synchronization" to find how to easily configure your servers to always be within microseconds of correct time.