简体   繁体   中英

IIS pool duplicates after appdomain restart

We have an application which read messages from IBM MQ Topic and interact with users via SignalR WebSockets.

Case:

  1. Open iis asp.net application web.config

  2. Change and save it (this causing appdomain restart)

  3. Repeate step 2 10 times

After that we can see many Application_Start / Dispose events in logs but at ONE of appdomain restart iterations haven't Dispose call. Cause that out IBM MQ listener handling message from old AppDomain therefore we have duplicate handling and business errors.

It seems like something constraint AppDomain from unload.

I know what it's very hard to say what's there happening, but maybe anybody knows how can we trace that problem.

Disable Overlapped Recycle is true

Shutdown Time Limit is 3s

what I have do in similar situation - on global.asax use this call

void Application_End(object sender, EventArgs e)
{
     // here signaling the listener to close - and wait until they do
     // also raise the shutdown time limit to more than 3 seconds, give them time to close
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM