473,378 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

AppDomain Crash and effect on ASP.net worker process.

Hi all,

I am using IIS 5.0 and this question is regarding working of ASP.net worker
process. I have only one web application right now on my web server. This
means that only one AppDomain will be created inside a single worker process.

NOw for example, due to some reason, my web application generated a stack
overflow error and crashed my appdoman (this happend in real case). In this
case as far as my knowledge goes, only appdomain should crash and not asp.net
worker process . Often i see remarks in internet that the ASp.net worker
process will recylcle or crash if the web application crashes. If i am
correct, the appdomain concept was created just to make sure that if there
are two app domains (if there are two web applications), then if one
appdomain crashes the other should survive. But if crashing one appdomain is
going to crash the entire asp.net worker process then all the appdomains
inside it will also get killed.

I am really confused about the concept a little bit. Can any expert throw
some light on it.

Thanks and Regards
Pradeep_tp
(Query_0000001)

Nov 19 '05 #1
6 2873
LOW (IIS process):- In this main IIS process and ASP.NET application
run in same process.So if any one crashes the other is also affected.
Medium (Pooled):- In Medium pooled scenario the IIS and web application
run in differentprocess.So iis will not affect the webapplication
High (Isolated):-In high isolated scenario every process is running is
there own process. Which probably you will want to implement for
complete safecty

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 19 '05 #2
Hi,

I am confused by your answer.

1) wshat are these Low, Medium and High???.
2) What is IIS process. Is this ASP.net worker process?.
3) I am still clueless about where appdomain fits in this scenario.

It would be kind if you could please explain me from the point of view of
appdomain and worker process.

thanks
pradeep_tp

"sh**********@yahoo.com" wrote:
LOW (IIS process):- In this main IIS process and ASP.NET application
run in same process.So if any one crashes the other is also affected.
Medium (Pooled):- In Medium pooled scenario the IIS and web application
run in differentprocess.So iis will not affect the webapplication
High (Isolated):-In high isolated scenario every process is running is
there own process. Which probably you will want to implement for
complete safecty

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 19 '05 #3
pradeep_TP wrote:
Hi all,

I am using IIS 5.0 and this question is regarding working of ASP.net
worker process. I have only one web application right now on my web
server. This means that only one AppDomain will be created inside a
single worker process.

I am really confused about the concept a little bit. Can any expert
throw some light on it.


Hi Pradeep,

In IIS 5, all ASP.NET applications run inside of the same process (excluding
the possibility of web gardens) and inside of that process (aspnet_wp),
there are app domains that provide application separation in terms of
configuration, etc. However, if one application leaks memory, hangs,
crashes, etc., it will affect ALL ASP.NET applications. There is no
_process_ isolation.

In your case, a StackOverflowException will raise a second chance AV and
that will crash the process, aspnet_wp. When that happens, every ASP.NET
application on the system will go down because the process hosting them
crashes.

The concept of Low, Medium, and High isolation has absolutely no relevance
in regards to ASP.NET applications. That setting will have no effect on
your ASP.NET apps.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #4
Hi jim,

You are very close to help me fully understand it. I am quite clear about
what you have said. You have said "if one application leaks memory, hangs,
crashes, etc., it will affect ALL ASP.NET applications". IF this is the
case, then what is the use of Appdomains. From what I have understood from
appdomain is, they provide web application isolation withing asp.net worker
process. If one appdomain crash can affect all asp.net application, then
what is the advantage of having appdomains.

Cheers!
pradeep_tp
I am also imagining a situation where my ASP.net web site is hosted by a
third party hosting service company. If my web app is going to crash then if
say there are 10 other different web app running, then would all these web
applications also crash!.

"JIMCO Software" wrote:
pradeep_TP wrote:
Hi all,

I am using IIS 5.0 and this question is regarding working of ASP.net
worker process. I have only one web application right now on my web
server. This means that only one AppDomain will be created inside a
single worker process.

I am really confused about the concept a little bit. Can any expert
throw some light on it.


Hi Pradeep,

In IIS 5, all ASP.NET applications run inside of the same process (excluding
the possibility of web gardens) and inside of that process (aspnet_wp),
there are app domains that provide application separation in terms of
configuration, etc. However, if one application leaks memory, hangs,
crashes, etc., it will affect ALL ASP.NET applications. There is no
_process_ isolation.

In your case, a StackOverflowException will raise a second chance AV and
that will crash the process, aspnet_wp. When that happens, every ASP.NET
application on the system will go down because the process hosting them
crashes.

The concept of Low, Medium, and High isolation has absolutely no relevance
in regards to ASP.NET applications. That setting will have no effect on
your ASP.NET apps.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #5
pradeep_TP wrote:
Hi jim,

You are very close to help me fully understand it. I am quite clear
about what you have said. You have said "if one application leaks
memory, hangs, crashes, etc., it will affect ALL ASP.NET
applications". IF this is the case, then what is the use of
Appdomains. From what I have understood from appdomain is, they
provide web application isolation withing asp.net worker process. If
one appdomain crash can affect all asp.net application, then what is
the advantage of having appdomains.

Cheers!
pradeep_tp
I am also imagining a situation where my ASP.net web site is hosted
by a third party hosting service company. If my web app is going to
crash then if say there are 10 other different web app running, then
would all these web applications also crash!.


Hi Pradeep,

The Common Language Runtime controls how code is executed in a managed
application. The CLR enforces app domain isolation so that code running in
one app domain cannot access objects in another app domain without copying
the object or using a proxy.

You also have the ability to unload an app domain without restarting the
process and affecting other applications. This is beneficial in cases where
configuration changes have been made (i.e. changes to the web.config) or
where you have created your own app domain and you want to unload it so that
assemblies loaded into it are unloaded as well.

Regarding your question about hosting at a third party, yes, you are right.
If your application that is overflowing the stack were running on a hosting
company's servers, when it crashes, it will bring down all other ASP.NET
applications running in that same process. For IIS 5, that means all other
ASP.NET apps on that box. For IIS 6, it means all ASP.NET apps running in
the same application pool. (Each application pool runs in its own w3wp.exe
process.)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #6
Thank you very much JIM :).

That was a great information. I didnt knew that crashing on ASP.net web
application can bring down the others too. Now I am quite clear about this
scene. Wondering how the hosting companies manages these kind of crashes!..
Thanks again JIM, your answer indeed has helped me.

Cheers!!!
Pradeep_tp

"JIMCO Software" wrote:
pradeep_TP wrote:
Hi jim,

You are very close to help me fully understand it. I am quite clear
about what you have said. You have said "if one application leaks
memory, hangs, crashes, etc., it will affect ALL ASP.NET
applications". IF this is the case, then what is the use of
Appdomains. From what I have understood from appdomain is, they
provide web application isolation withing asp.net worker process. If
one appdomain crash can affect all asp.net application, then what is
the advantage of having appdomains.

Cheers!
pradeep_tp
I am also imagining a situation where my ASP.net web site is hosted
by a third party hosting service company. If my web app is going to
crash then if say there are 10 other different web app running, then
would all these web applications also crash!.


Hi Pradeep,

The Common Language Runtime controls how code is executed in a managed
application. The CLR enforces app domain isolation so that code running in
one app domain cannot access objects in another app domain without copying
the object or using a proxy.

You also have the ability to unload an app domain without restarting the
process and affecting other applications. This is beneficial in cases where
configuration changes have been made (i.e. changes to the web.config) or
where you have created your own app domain and you want to unload it so that
assemblies loaded into it are unloaded as well.

Regarding your question about hosting at a third party, yes, you are right.
If your application that is overflowing the stack were running on a hosting
company's servers, when it crashes, it will bring down all other ASP.NET
applications running in that same process. For IIS 5, that means all other
ASP.NET apps on that box. For IIS 6, it means all ASP.NET apps running in
the same application pool. (Each application pool runs in its own w3wp.exe
process.)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com


Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: José Joye | last post by:
I have a windows service where I create another appdomains. In the newly created AppDomain, I make use of a C library. If I issue an Abort(1) within this library, it simply hard stop my main...
8
by: Rob Bazinet | last post by:
Hello all; I have an ASP.NET application which I run part of it in a new thread. The part running is very processor and time intensive and takes an hour plus to complete. The problem I am...
2
by: Ran Davidovitz | last post by:
Hi. We have a computer that has only one virtual directory (webservice) - when working with the webservice the memory consumption of the aspnet_wp is going to an avg of 320 mg. 140 mg of that...
0
by: RJ | last post by:
I am developing an ASP.NET 2.0 website, and wish to programatically jump/link ( in C# code) to a page that is being developed under ASP.NET 1.1. Both of these pages have numerous references to...
4
by: SevDer | last post by:
Hi We have a case that our AppDomain (workerprocess) reloads randomly. We simply have a public static hashtable that keeps an object inside which is determined by the key sessionID, and although...
0
by: Chris van de Steeg | last post by:
In iis6 there is this feature to recycle your appdomain at certain tresholds, great. But I recently ran into strange problems when my appdomain was recycled. When my application starts, it loops...
1
by: [david] | last post by:
What am I doing wrong? I'm trying to capture stdErr in a multi-threaded program. This code crashes wxPython with /Py Assertion Error: C++ assertion "m_count=-1 || m_count=-2" failed/ What I'm...
2
by: csprakash | last post by:
Hi All, I want to run some user when an Application is started, or when a worker process is started. Application_Start, Init methods of HttpApplication in Global.asax.cs are of not use, as they...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.