'Attempted to access an unloaded AppDomain'

C

cameron

I have a page that needs to process aproximately 7000 LDAP entries and
does 10-12 SQL DB calls per entry. It is a busy, busy page. I have it
schedualed to run every night at 4 am server time. It runs for about 2
hours, processing a smidge over 4000 of the entries and then borks with
the error:

[AppDomainUnloadedException]: Attempted to access an unloaded AppDomain.

The IIS logs shows a status of 200 for that page, the Event Viewer shows
nothing unusual around that time, I can run the script in the
development environment without issue, (can not run the script during
the day on the production environment due to the load it places on the
server).

I was thinking that it might be a setting in the machine.config file
that recycles the process:
Timeout = infinite
requestlimit = infinite
memorylimit = 85
responseDeadlockInterval = 00:03:00

We have sripts that check the memory usage every 5 min and that is with
in acceptable ranges. The only one that could be causing it is the
responseDeadlockInterval - is there anyway to verify this? Does it log
it somewhere that the process is being spanked due to some condition? I
really do not want to be playing with these values on a production
server without knowing for sure that it is the cause.

The server is a Windows 2000 box.

Thanks.

-Cam
 
S

Steven Cheng[MSFT]

Hi Cam,


Thanks for posting in the community!
From your description, you encountered
"[AppDomainUnloadedException]:Attempted to access an unloaded AppDomain"
Exception. Since this probem occurs on the production environment. You are
looking for some means to monitor the workerprocess to see whether is the
"responseDeadlockInterval" limit in the processModel setting cause this
issue, yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my experience such exception as "AppDomainUnloadedException" is
likely caused by the aspnet application AppDomain is recycled. Also, from
your description, I agree with you that it is likely due to the
processModel setting limitation. And here are some tech artiles on
monitoring the ASPNET workerprocess and perfomance, you may have a view to
see whether they can help to troubleshoot this issue:

#Watching Your Server Processes
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-watchserverproces
ses.asp?frame=true

#ASP.NET Performance Monitoring, and When to Alert Administrators
http://msdn.microsoft.com/library/en-us/dnaspp/html/monitor_perf.asp?frame=t
rue

#Production Debugging for .NET Framework Applications
http://msdn.microsoft.com/library/en-us/dnbda/html/DBGch02.asp?frame=true

#Performance Counters for ASP.NET
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconPerformanceCounter
sForASPNET.asp?frame=true

Please check out the above items. If you have any new findings or further
questions on this issue, please feel free to post here.



Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top