When we deploy our web application, we copy all the code into a new directory and then point iis to this new directory. When we do this, the number of updates increases, but never decreases. In addition, the Application_End event never fires.
For some unknown time, while both sets of AppDomains are still being reported by perfmon, the system works very poorly, and% of the time in GC buses is up to 100%. In the end, I recycle the application pool so that the application runs smoothly again.
Additional information: the list of applications shows 2 on my dev machine, but 4 runs on a real server ... we just have one application running in the pool, so this means that some kind of library that we use is creating application domains.
What should I do to try to debug what is happening? What can prevent the unloading of the application domain?
Update 9/3/2014
After receiving more detailed information about the log, it seems that the problem is not that the old application domains remain, the new applications are saved during the reboot. Instead of an application starting one new instance, it starts with two. Sometimes we get application_end from the old instance, sometimes we do not.
Update 9/4/2014
Both things are happening. Using the process explorer, I see on one of the machines that the old application domain still exists, and the new one. There were only 2 application domains on the other machine, but there was a space in their sequential identifiers. So, two instances began (we also received a log message from the start application), one of them died almost instantly, leaving 2 application domains.
source share