Solved

Application Pool in IIS 6.0

Posted on 2006-07-04
8
394 Views
Last Modified: 2010-04-20
Platform:
Our webserver is IIS 6.0 which runs on Windows 2003 server.
We have several DotNET applications (around 50 DLLs) running under a single virtual directory.
All of them are under a single application pool.

Issue:
I am updating a DLL file.
After update, if I try to access a function from the updated DLL, I am getting unanticipated errors.
If I recycle the application pool and tries to access the function then it works fine.

Questions:
1. What are the causes for this scenario? How to overcome this?

2. Currently, I have scheduled the App. Pool to automatically recyle the worker
   process 4 times a day in a 3 hour interval.  Is that right?

3. How to manage the application pools and woker processes settings optimally?

4. When I update the DLL file, how can I enforce that the updated DLL files are
   synchronized with the application pool? (ie. without manually recycling the app. pool)

Thanks in Advance
Karthik
0
Comment
Question by:Simonho888
  • 3
  • 2
8 Comments
 

Author Comment

by:Simonho888
ID: 17070868
I did not get any reply for this posted question FOR THE PAST 6 DAYS.

Is there any body in Experts Exchange to answer this?
0
 

Author Comment

by:Simonho888
ID: 17092992

NO REPLY FROM EXPERTS EXCHANGE AT ALL!!!!!!

Is there any Experts to comment for this question?

Or

Is there any Moderator to close the question?

0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 17182838

Just for note, if you don't get a reply from anyone quite quickly there are a number of things you can do.

Firstly you can try a Pointer Question in a few different topic areas to attact the attention of more of us (The IIS TA would have been good as it is far busier than this much more general one - http://www.experts-exchange.com/Web/Web_Servers/IIS/)

Secondly you can drop a message to the Page Editor for this topic area asking for assistance (majorwoo@experts-exchange.com as listed in his profile).

And finally you can drop a message onto one of the Feedback forums which will get the attention of the moderators and a bit of help getting someone to look from there.

> 1. What are the causes for this scenario? How to overcome this?

The DLL will be in use - generally loaded into memory - by the Worker Process for your application pool. It should load the new DLL when the application recycles regardless. Although the Overlap used may interfere with that - Worker Process Overlap is not used with manual pool recycling if I remember correctly.

> 2. Currently, I have scheduled the App. Pool to automatically recyle the worker
> process 4 times a day in a 3 hour interval.  Is that right?

Depends very much on what your website is doing and the quality (for want of a better word) of the code used. If the code is very efficient and clean then it should really be unnecessary to recycle the pool as basically all you're doing is running a quick cleanup.

> 3. How to manage the application pools and woker processes settings optimally?

While everything is running under one virtual directory you cannot have more than one application pool serving the DLLs. Generally application pools are most commonly used to create strict boundaries between applications - they allow you to seperate out all the processes used as well as the memory space each gets to play with. It would also allow you to further seperate them by running each application pool as a seperate identity.

> 4. When I update the DLL file, how can I enforce that the updated DLL files are
> synchronized with the application pool? (ie. without manually recycling the app. pool)

Afraid I don't know of a way to do this - you are updating a file the application loads into memory as part of the worker process the minute someone requests it. It won't be removed from memory until the application pool recycles so it would seem quite difficult (to me) to update that on the fly.

HTH

Chris
0
 

Author Comment

by:Simonho888
ID: 17199832
Thanks for the reply.

> 1. What are the causes for this scenario? How to overcome this?
The DLL will be in use - generally loaded into memory - by the Worker Process for your application pool. It should load the new DLL when the application recycles regardless. Although the Overlap used may interfere with that - Worker Process Overlap is not used with manual pool recycling if I remember correctly.

@@ That is not happening. (ie) Loading of DLL regardless of application pool recyle.  
The new DLL is NOT getting loaded unless and otherwise I manually recycle the app.pool.

> 3. How to manage the application pools and woker processes settings optimally?
While everything is running under one virtual directory you cannot have more than one application pool serving the DLLs. Generally application pools are most commonly used to create strict boundaries between applications - they allow you to seperate out all the processes used as well as the memory space each gets to play with. It would also allow you to further seperate them by running each application pool as a seperate identity.

@@ I can split my applications in to different virtual directoires. Hence, I can place them in different application pools.
In that case:
a. Is there any limitations in IIS on the number of application pools?
b. Will more number of application pools casuse performace degradation to the webserver?
c. What will be the optimal settings for application pools and worker processes?
0
 
LVL 71

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 17200031

> @@ That is not happening. (ie) Loading of DLL regardless of application pool recyle.  
> The new DLL is NOT getting loaded unless and otherwise I manually recycle the app.pool.

Then that will be caused by the overlap feature of the application pool. In order to preserve connections to the site without interuption it creates a new application pool while the old is still running and transfers all connections to that. I would suspect that it preserves the loaded DLLs in that case.

> a. Is there any limitations in IIS on the number of application pools?

I've successfully run with up to 500 on a single server. There is a built in limit of 60 that must be changed; It's documented here in brief:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d779ee4e-5cd1-4159-b098-66c10c5a3314.mspx?mfr=true

And requires a value called UseSharedWPDesktop under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters to be changed from 0 to 1.

> b. Will more number of application pools casuse performace degradation to the webserver?

Depends on how much memory is used by each application. In general the memory usage of running multiple application pools is higher than running all applications in one, but the fault tolerance is much higher with multiple.

> c. What will be the optimal settings for application pools and worker processes?

I've never changed them from the default except in a small number of cases where the recycle times have been customized. Although there is tonnes of documentation on it from MS here (especially in the Operations Guide which has all the details about Pool Overlapping):

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/04cef3ab-c2bb-4e9b-9183-58edcc5fcf23.mspx?mfr=true

Chris
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question