Solved

Application Pool in IIS 6.0

Posted on 2006-07-04
8
389 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 70

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 70

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now