How many AppPool per GB on IIS 8?

I am running IIS8.0 with 32GB of RAM and I currently have 7 AppPools configured. My question is how many AppPools can I put on this server?

Also per AppPool how many users should have access to each AppPool. I currently have about 25-35 users accessing each AppPool. The problem I am having is that everyday between 9:30Am - 10:00AM users are getting kicked out. The fact that its not everybody leads me to rule out a recycling issue as I have that set to 1AM everyday.

Any ideas on this?

Thanks for your help!
CervisTECHAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
There are no recommendations of how many AppPools can go on a server.  Typically its one per website and depending on what each website is doing, you can have hundreds of websites on a single server.

Flat HTML sites consume very little resources compared to ASP.NET, PHP or other dynamically scripted websites.  Either way, 7 AppPools is nothing for a server with 32GB RAM.

The correct way to look at this issue, is to profile your existing website and observe their individual resource consumption patterns.  The profiling will indicate what the maximum number of websites (AppPools if on a 1:1 configuration)  your server can reliably support.

As for users per AppPools, again, this is an web application question.  You need to understand your website/webapp in order to answer this.  As an example, I supported on IIS6 (!) several web applications, with 1 AppPool per app, that had a daily average of 15,000 users logged in.  Concurrent logged in users were in the 500-1000 range.

The servers running the sites mentioned above, had 16GB RAM.

When trying to figure out what your web app can support, you will need to sit with the developers to better understand how session management is handled, how data is managed in the app code, what happens when a session is ended (correctly or incorrectly), what is being cached and for how long, etc.

I will only ever recommend 1 AppPool per website/webapp.  Web gardening (more than 1 AppPool per website) can be a performance problem and definitely a session management challenge since AppPools are isolated processes and typically do not share any data.

So, I recommend the following:

1. perfmon the server for overall CPU & RAM utilization, Disk read and writes per second
2. perfmon the individual w3wp.exe (this is AppPool process) for CPU & RAM utilization
3. use the above info to generate a baseline
4. use the above info to spot high traffic times for resource consumption
5. analyze your https logs for activity on the sites and try to correlate the resource consumption to user activity on the sites.

From here you may be able to ID a potential issue and alert the DEV team about where to investigate possible code issues.

There is no easy answer or best practice for addressing this problem.  There could be any number of issues ranging from IIS Configuration to sloppy coding to database issues (if a db is involved).

So the question isn't about AppPools per GB or the number of users per AppPools.  The question is what are your users doing in the website/webapps that may be causing them to be kicked out of the app at a regular interval.  I'm not saying it is a user fault, but knowing what your users are doing at the time of the interruption will help you get a handle on possible trouble points.

Dan
CervisTECHAuthor Commented:
Dan,

The information you provided is very helpful and well explained. I will apply your suggestions. The website is a application we use to process claims. We usually see the kick out while processing a claim between 9:30-10:00AM. It is not happening to everybody just the claims department. I tried moving the effected users to another AppPool with less users accessing it but I am still getting the problem. In my troubleshooting I also notice that I am getting a lot of 1309 Event errors. I am not sure if this is related to my problem or not. Below is copy of the errors:

There are a few types of errors that seem to occur around the same time, but not necessarily for claims. All point to the source ASP.NET 4.0 30319.0
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/13/2015 10:02:06 AM
Event time (UTC): 10/13/2015 5:02:06 PM
Event ID: ba286dd7914b48808b32a4f27f92e8fa
Event sequence: 37
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT/EZ-Cap_6x_Claims-2-130892293174998133
    Trust level: Full
    Application Virtual Path: /EZ-Cap_6x_Claims
    Application Path: D:\Program Files (x86)\MZI\EZ-CAP60\
    Machine name: LAX14APPS
 
Process information:
    Process ID: 19236
    Process name: w3wp.exe
    Account name: M3NET\Admin.EZCap
 
Exception information:
    Exception type: InvalidCastException
    Exception message: Conversion from string "" to type 'Integer' is not valid.
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
   at EZCAPNET.AddClaimDetails.SettinghiddenValues()
   at EZCAPNET.AddClaimDetails.Page_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/14/2015 9:53:12 AM
Event time (UTC): 10/14/2015 4:53:12 PM
Event ID: 9f5fd14c963c4fc1a554e628bd863f65
Event sequence: 34115
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT/EZ-Cap_6x_AU-1-130892993600741242
    Trust level: Full
    Application Virtual Path: /EZ-Cap_6x_AU
    Application Path: D:\Program Files (x86)\MZI\EZ-CAP60\
    Machine name: LAX14APPS
 
Process information:
    Process ID: 8592
    Process name: w3wp.exe
    Account name: M3NET\Admin.EZCap
 
Exception information:
    Exception type: ArgumentOutOfRangeException
    Exception message: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at EZCAPNET.AuthorizationListview.PopulateLabelsNew(Int32 _index)
   at EZCAPNET.AuthorizationListview.MakeSelectGridNew(Int32 _TotalCnt, Boolean _Repopulate)
   at EZCAPNET.AuthorizationListview.FillDataGridNew(Boolean _Repopulate)
   at EZCAPNET.AuthorizationListview.Page_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/16/2015 8:58:29 AM
Event time (UTC): 10/16/2015 3:58:29 PM
Event ID: e03701d1f91342008968829dfdac70b1
Event sequence: 4981
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT/EZ-Cap_6x_Claims-2-130894836492391012
    Trust level: Full
    Application Virtual Path: /EZ-Cap_6x_Claims
    Application Path: D:\Program Files (x86)\MZI\EZ-CAP60\
    Machine name: LAX14APPS
 
Process information:
    Process ID: 5188
    Process name: w3wp.exe
    Account name: M3NET\Admin.EZCap
 
Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.
   at EZCAPNET.QueryBuilder.Page_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

+      System
            -      Provider
                  [ Name]       ASP.NET 4.0.30319.0

            -      EventID      1309
                  [ Qualifiers]       32768

                  Level      3

                  Task      3

                  Keywords      0x80000000000000

            -      TimeCreated
                  [ SystemTime]       2015-10-20T16:58:03.000000000Z

                  EventRecordID      19488

                  Channel      Application

                  Computer      LAX14APPS.m3net.net

                         Security
      
-      EventData
                        
                  3005
                  An unhandled exception has occurred.
                  10/20/2015 9:58:03 AM
                  10/20/2015 4:58:03 PM
                  b84cc9997ae9438db61fecb4765e5a58
                  34
                  1
                  0
                  /LM/W3SVC/1/ROOT/EZ-Cap_6x_CS-PR-2-130898338576528250
                  Full
                  /EZ-Cap_6x_CS-PR
                  D:\Program Files (x86)\MZI\EZ-CAP60\
                  LAX14APPS
                  
                  16960
                  w3wp.exe
                  M3NET\Admin.EZCap
                  InvalidCastException
                  Conversion from string "" to type 'Integer' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) at EZCAPNET.AddClaimDetails.SettinghiddenValues() at EZCAPNET.AddClaimDetails.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Input string was not in a correct format. at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
Dan McFaddenSystems EngineerCommented:
You have here either a code issue (Conversion from string "" to type 'Integer' is not valid) or bad data in the database.

I would speak with your DEVs to see what is going on there and then inspect the data in the database that corresponds to what the code is trying to pull/work on.

This is definitely not an IIS configuration issue.

The error message is stating that it is trying to convert data between types and that it cannot perform the action.  I would show the error to a developer, especially the last section.  It would appear to me that nothing is checking/validating data before trying to work on it.

Dan
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

CervisTECHAuthor Commented:
I tend to agree with you. I have submitted my concerns to DEV. In the meantime I have a whole department having a fit due to being kicked out of the application. They have to log out and back in again just to get their work done. Until this get resolved from a development stand point I have to try and come up with a temporary fix or solution to this issue.

I am running out of things to try. If you have any additional things I should try I welcome your suggestions.

Thanks for your time.
Dan McFaddenSystems EngineerCommented:
From a production operations standpoint, you hands are kind of tied.  If there is a code issue, there is nothing you can do but wait for a fix or new release.  If there is a data issue, you can work with the DBAs to see if you can find the data that the code is looking at and compare that to other data that doesn't result in the app throwing an error.

I understand your situation very well, I've been there many times... my immediate recommendation is to do the following:

1. ID a user that consistently experiences the issue
2. ID a user that never seems to experience the issue
3. observe exactly what user 1 does when the error occurs
3a.  take screen shots and note the data that is being worked on
4. ask user 2 to redo the same steps
4a.  take screen shots and note the data that is being worked on
5. compare the data that both users worked on and try to spot differences
6. identifying the exact steps that reliably reproduce the error
7. with the DBAs, see if you can spot data that may be causing the issues for user 1, elsewhere in the database
7a. if you find data similarities, does this correspond to other users reporting the same issue?
8. create as bug report (as detailed as possible) and submit to your manager and the DEV team.
9. reassure you users that the issue has been escalated.
9a. suggest that your users bring up the issue to their manager(s).  Sometimes user pressure can force the problem into a higher visibility position.

10. analyze the site http log and try to see what activity is occurring during the time the kick outs happen
11. analyze the System and Application event logs to try to gather correlating error information

As you can see, knowing your production environment will be incredibly helpful in situations like this.

There are typically no temporary fixes for buggy code except to fix the code.  There is a slight possibility that the issue may be data.  I would invest time investigating the error from this angle while the DEVs work out the code issue.  Hopefully the DEVs are not the DBAs!

Dan

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CervisTECHAuthor Commented:
Dan was very helpful and knowledgeable.

Thanks Dan!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.