Pittsburgh DBA
Pittsburgh DBA

Reputation: 6783

First POST to Azure MVC3 app very slow

As the title implies, the first "cold" POST to our MVC3 app in the Azure cloud is very slow. Once it "spins up", the normal requests are blazing fast. The first spin-up after a brief period of rest takes a few seconds. Subsequent requests can be measured in milliseconds.

How can we keep this thing awake?

Upvotes: 3

Views: 876

Answers (1)

Matt Warren
Matt Warren

Reputation: 10291

This is probably due to the appplication pool unloading after a period on inactivity. The next request has to take the overhead of starting it up again.

To confirm this, you need to turn on the performance counters and look at the numbers of app domain loads and unloads.

Either way, this blog post explains how to fix it.

Upvotes: 8

Related Questions