IIS Application Pools is recycling too often?
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=28989
Printed Date: 01 April 2026 at 4:05pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: IIS Application Pools is recycling too often?
Posted By: JohnLug
Subject: IIS Application Pools is recycling too often?
Date Posted: 29 November 2010 at 3:25pm
|
Maybe dumb question here, but have to try to figure this out.
Apparently the red "denied error" can be caused by the App Pool recycling too often?
Problem I've had is if they don't recycle, the site slows down.
How often is too often and is there a work around for this?
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 30 November 2010 at 10:20am
|
On the larger forums we have which have 200 to 300 active users we set the App Pool to Recycle at around 5am every morning.
On this support forum we set the App Pool to never recycle as the traffic levels are usually lower at 30 to 100 active users.
We never see a slow down in performance with any of these app pool settings for forums, however if you are seeing performance issues it could be caused by other applications on your website. To avoid this you could create a Virtual Directory/Application for the forum folder and place it in it's own application pool.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: JohnLug
Date Posted: 30 November 2010 at 5:11pm
|
I found they recycle every 24 hours.
I will ask for it's own application pool.
Thanks
|
Posted By: MaximeRoy77
Date Posted: 12 December 2010 at 2:40pm
|
My forum users (avg: 150 active users simultaneous) are reporting random errors like this.
Is it the one you are mentionning ? I have set the APP_RECYCLING to 1 x daily @ 5am .
What are my options to fix this ?
Convert to SQL_sessions ?
|
Posted By: 123Simples
Date Posted: 12 December 2010 at 6:34pm
You have made some changes to the software so it is hard to know what to suggest. It does look like an issue with the recycling but Bruce or others will be better to answer this for you
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
Posted By: MaximeRoy77
Date Posted: 13 December 2010 at 2:56am
|
^ yes, but changes are very minor. How can this generate random issues ? anyway, i'll wait for recommendations, thanks
|
Posted By: RadioActiveLamb
Date Posted: 21 December 2010 at 4:47pm
|
I'm suffering from the same issue. I'm hosting at Winhost.com, which is the new "variable" since this started happening. I've opened a support ticket with them to inquire about app pool settings, since I don't have direct access to them.
I and many of my users report that they read one page of posts, then try to post a quick reply and then get this message. They must press refresh, which keeps them logged-in. If they are quick, they can post their reply. When this happens, all the posts are marked as "new". It makes catching-up on new threads very difficult, and participating in conversations even more difficult.
|
Posted By: WebWiz-Bruce
Date Posted: 21 December 2010 at 5:13pm
|
Could you also check that your database server also has the same time as the web server as we have found that having database server set to a different time can cause issues with dropped sessions.
A new database date function has been created for the next release which will force all dates to be set web server side to prevent issues.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: RadioActiveLamb
Date Posted: 21 December 2010 at 5:18pm
|
Their DB server does have the correct time, synchronized with the web server's time. The web server is Windows 2008 R2 x64, and the SQL server is SQL 2008 Web edition. I had them check the time last week. They were a couple minutes off, but have since fixed it.
They are in a different time zone than me and my users. I'll report back when I hear about my application pool inquiry.
|
Posted By: WebWiz-Bruce
Date Posted: 21 December 2010 at 5:19pm
|
RadioActiveLamp I've just looked up Winhost and it appears that they set the app pools to only 100MB of memory! You can not run any ASP.NET or Classic ASP application in 100MB of memory.
Your problem I suspect would be the app pool recycling. If you have anything over 20 active users on your forum it will probably recycle every 10 to 20 minutes causing loads of issues.
To give you an idea we set application pools for our own hosting services to 800MB for each website and 500MB for the free hosting websites:-
http://www.webwiz.net/hosting/isolated_application_pools.asp" rel="nofollow - http://www.webwiz.net/hosting/isolated_application_pools.asp
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: RadioActiveLamb
Date Posted: 21 December 2010 at 5:22pm
|
Well, that is a problem...
At slow times, I have 35 active users, but frequently jump to 60+
|
Posted By: 123Simples
Date Posted: 21 December 2010 at 5:31pm
RadioActiveLamb wrote:
Well, that is a problem...
At slow times, I have 35 active users, but frequently jump to 60+ |
You could consider jumping boat and asking Bruce to take over the hosting for you RAL - then problem solved 
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
Posted By: RadioActiveLamb
Date Posted: 21 December 2010 at 9:22pm
|
I'm working toward that solution now...
|
Posted By: MaximeRoy77
Date Posted: 22 December 2010 at 12:32am
WebWiz-Bruce wrote:
You can not run any ASP.NET or Classic ASP application in 100MB of memory.
Your problem I suspect would be the app pool recycling. If you have anything over 20 active users on your forum it will probably recycle every 10 to 20 minutes causing loads of issues.
To give you an idea we set application pools for our own hosting services to 800MB for each website and 500MB for the free hosting websites:-
http://www.webwiz.net/hosting/isolated_application_pools.asp" rel="nofollow - http://www.webwiz.net/hosting/isolated_application_pools.asp
|
So basically you are saying that if we have unlimited RAM App Pools, and we still get SESSION TIMEOUTS it probably is a memory shortage problems ?
|
Posted By: WebWiz-Bruce
Date Posted: 22 December 2010 at 9:11am
|
There are lots of different things that can cause sessions to be dropped, including when the app pool is set to recycle, if app pool crashes, using multiple worker processes for the app pool, load balanced servers that are not session aware, other applications forcing sessions to be dropped, etc, etc.
However, if your Web Wiz Forums installation is set to store sessions in databases it should reduce the impact of the application pool being recycled, but would still affect the new post indications and the active users list.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: MaximeRoy77
Date Posted: 26 December 2010 at 12:55pm
|
Thanks, it there a way to track or log what is causing the private pool of the forum to crash ?
|
Posted By: WebWiz-Bruce
Date Posted: 27 December 2010 at 10:23am
|
There are tools such as Microsoft's Sysinternals:-
http://technet.microsoft.com/en-us/sysinternals/default" rel="nofollow - http://technet.microsoft.com/en-us/sysinternals/default
We also host their support forum on one of our Web Wiz Forums hosting packages at:-
http://forum.sysinternals.com/" rel="nofollow - http://forum.sysinternals.com
However, a simpler option would be to place Web Wiz Forums in it's own application pool by converting to the directory to an IIS application directory also known as a virtual directory. You can then be sure that nothing else is interfering with the application pool running your forum which can then also be fined tuned for your forums needs.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: RadioActiveLamb
Date Posted: 28 December 2010 at 5:04pm
|
Bruce,
Thanks for all your suggestions. However, I'm still struggling with this. Now, I'm getting the expired session within seconds of opening a thread or composing a new PM.
Would you mind putting-together a KB article/FAQ to configure the IIS6 application pool properly? I dug-around in the KB and couldn't find anything specific.
Here's how I have the app pool configured. This is a dedicated pool for the forum:
The SQL 2008 R2 (web) engine is running on the same localhost, so time shouldn't be a problem.
I've tried storing the session data in the DB, and I'm using the default cookie path.
I truly appreciate your assistance.
- Jeff
|
Posted By: WebWiz-Bruce
Date Posted: 29 December 2010 at 3:26pm
|
Not really done any configuration on IIS 6 for a while but as I recall the Rapid-fail Protection often caused issues and best of disabling it. You should also remove the Memory Recycling.
Make sure you also have Windows 2003 SP2 installed as I recall some issues with Windows 2003 that would cause application pools to crash if there was Access Databases running on the server.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: RadioActiveLamb
Date Posted: 29 December 2010 at 3:43pm
|
Isn't the "Memory recycling" section where I set the pool size to 500MB?
|
Posted By: WebWiz-Bruce
Date Posted: 29 December 2010 at 5:14pm
Yes, unless you have a specific reason to use it you should not use Memory Recycling as it can cause the application pool to recycle early.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: RadioActiveLamb
Date Posted: 29 December 2010 at 6:44pm
If that's where I'm supposed to set the large memory pool, then how do I do that and not use it at the same time? As-per your suggestion, the application pool memory allocation should be 500MB+ for busy forums. Sorry, but I'm just confused.
|
Posted By: WebWiz-Bruce
Date Posted: 29 December 2010 at 8:49pm
Virtual memory should be set higher, however if you are not using shared hosting where you are restricted on memory you should not set any memory limits and disable the Memory Recycling altogether.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Nick-V
Date Posted: 03 January 2011 at 11:47am
|
I just had my first session expired ever...nothing has changed on my server and there is little to no activity going on and it restarts at 6am every day.
I am wondering if a recent windows update has caused this recent report?
|
Posted By: MaximeRoy77
Date Posted: 03 January 2011 at 10:10pm
|
I've had theses a lot ( on a forum with 150 average active users ) and the EVENT LOG is starting to log OUT OF MEMORY entries caused by the forum software.
Error: File /forum/functions/functions_common.asp Line 2018 Out of memory. Unable to allocate required memory..
Code generating the error:
'Place the array into the web servers application memory pool if the user has a session ID If strSessionID <> "" Then Application.Lock Application("sarryUnReadPosts" & strSessionID) = sarryTmp1UnReadPosts Application("sarryUnReadPosts2" & strSessionID) = strSessionID Application.UnLock 'Else the user doesn't have a session ID so use the session instead Else Session("sarryUnReadPosts") = sarryTmp1UnReadPosts End If
LINE 2018 is
Session("sarryUnReadPosts") = sarryTmp1UnReadPosts
Hope this information helps the developper to fix this.
Thanks
Max
|
Posted By: WebWiz-Bruce
Date Posted: 04 January 2011 at 11:58am
This has nothing to do with this topic but what it means MaximeRoy77 is that your server is out of resources and doesn't have adequate memory available.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: MaximeRoy77
Date Posted: 04 January 2011 at 2:31pm
|
Maybe noting to do exactly but since this topic discuss memory usage, virtual pools, I was hoping to help others identify their problems. The EVENT LOG is a good place to check if your web application is not having enough ressources.
I am having Sessions Timeout frequently , maybe because of a lack RAM and this EVENT LOG entry suggest that it is why the recycling is going on an on - creating timeouts.
I decided 3 days ago to upgrade to a 16GB RAM server ;-)
|
Posted By: MaximeRoy77
Date Posted: 07 January 2011 at 5:24pm
|
...again, to help others a bit here. I have a forum averaging 150 active users and the Application Pool runs at 750MB RAM usage (with new server upgrade from 4GB to 16GB RAM) with much less frequent session timeouts and "insufficient permissions" errors. But still, got some... and this is sad.
I might have to re-try SQL Sessions now and report status later.
|
Posted By: WebWiz-Bruce
Date Posted: 10 January 2011 at 11:26am
750MB of RAM for the application pool seems like an awful lot. We have many Web Wiz Forums running on our servers here, including for big companies like Microsoft, that have between 150 and 500 active users at all times and find that the application pools for these forums use around 250MB of memory.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: MaximeRoy77
Date Posted: 10 January 2011 at 12:55pm
|
After a reboot, the App Pool of the forum, with exactly 111 users, runs at 365MB RAM !
|
Posted By: MaximeRoy77
Date Posted: 15 January 2011 at 2:57pm
No recylcing in days..... the forum AppPool runs at 1500 MB
|
Posted By: WebWiz-Bruce
Date Posted: 17 January 2011 at 9:40am
|
There is something wrong with your setup as a 16GB web server we would run around 2,000 websites each with it's own app pool split between 4 Hyper-v servers with around 300 running Web Wiz Forums and 3,000 to 15,000 concurrent connections.
A forum with 150 active users we would consider low usage and host it on a shared server and not expect it to make much of an impact on resources.
Make sure that you are following Microsoft best practises for the server including running app pools in 32 bit mode for improved memory and performance.
You should also recycle the app pool at least once in 24 hours. Setting a time like 4am when your board would be quite is always a good idea.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: MaximeRoy77
Date Posted: 17 January 2011 at 1:39pm
|
^ Thanks, I have setup a recycle every 24h @ 4AM. This should stabilise the AppPool.
After 2 hours, following a recycle, it runs at 600MB RAM with Sessions not in SQL.
Maybe your it can run at 300MB but with SQL Sessions active ?
|
Posted By: WebWiz-Bruce
Date Posted: 17 January 2011 at 3:37pm
|
It does not really matter if you store the sessions in the database or not as only around 10 to 50 characters are stored in the database session table.
The advantage of using the database though is if the app pool recycles the session data that is stored in the database is not dropped.
600MB still seems like an awful lot. I've just looked at a forum here on a Win2k8 R2 server with 198 active users at present, app pool recycles at 5am, and it is currently using 185MB of memory.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
|