I take advantage of a recent experience i had working with some customers implementing Websites under Azure Web Apps. This particular customerwas getting some 503 errors on the Slot, although they created a new Slot and swap, the issue remained.
We advanced with IIS / FREBs logs analysis and managed to verify some preload request stucked in a customer’s method and it was stucked on that situation, for several hours.
Heavy Scenarios under this configuration might generate a hang dump of the app to debug it Offline.
Checking the slot where http://YourSite-stage.azurewebsites.net/ run and got 503, the requests were getting to the worker, but there were some timing out in the queue. This was happening as the preload request was stuck in the code ( this symptom could also occur if customers’ requests were piling up in the App as well so when timing out on the worker, probably because of the Application code causing the issue). Preload requests finished intermittently for the code deployed to the slot :Process got stuck in preload so it never started processing requests from the HTTP queue.
We recommended to the Customer to Disable the preload on the slot, so that would avoid the block opening the queue until the preload request finishes, they will start piling up the requests in the application instead of the queue.
By this, Developers would have an easier work for verifying where the bottleneck is, probably profiler events being emitted, would help on verifying what the code is doing.
HOW TO: Turn Off preload?
————————– Well, there are a couple ways to accomplish that:
1. Disable Always On in the App settings for the slot (will need an organic request to startup the App)
2. Use a transform to turn it off for the site. You need to place the to lowing Applicationhost.xdt in the D:\Home\Site folder.
Hope it helps!!!! 🙂