We have a busy webserver handling around 1000 asp.net requests/second.
We have a deploy script which copies compiled asp.net from our development box.
The script first stops IIS on the production server, copies the code, then restarts.
We use the following command to stop the app pool for the site:
%windir%\system32\inetsrv\appcmd stop apppool /apppool.name:ourappname
The problem is that this stops accepting new requests but waits for existing requests to complete. There are usually a handful of requests that take up to a minute to finish, during which time no new requests are served. So for the sake of fulfilling a dozen or so requests, we miss out on serving the 1000 * 60 = 60,000 requests that have come in during the minute or so while we're waiting for 12-20 to complete. This is dumb.
What we would LOVE to do is force an app pool stop within x seconds. This doesn't seem to be possible. Is there a better way to accomplish what we're doing i.e. fast stop of iis 7?