Question

Whenever we get the error "Role Instances are taking longer than expected". The only possible options to do are .

  • Shutdown the emulators and try again.
  • Restart the machine and see if that helps.
  • Uninstall the Azure Tools for that version.

Some times uninstalling the same takes a long time,some times even days. It appears that some process or service is blocking the same. Has anyone faced this before ? If yes does anyone know which process would be blocking the same?

Was it helpful?

Solution

When an instance starts it will run the OnStart method on the worker/web role (depending on your service type). The more stuff you have in there, the more time it will take to start up the role. Common caveats are the Cache as mentioned and blob/table storage (if you do read/write/create when you start the role).

Try minimizing the OnStart's workload and moving any storage stuff in async tasks.

OTHER TIPS

I have had similar problems as well in the past

IISConfigurator could not map the web roles in IIS. In my case it was due to corrupted file system ACLs on the code directory. See logs under C:\Users\YOUR_USER_NAME\AppData\Local\dftmp\IISConfiguratorLogs\

Another cause might be that something else has tied up the Port Numbers that Azure is trying to bind your web role on. Or that the ports that the local storage needs for tables/blobs and queues (10000-10002) have been taken by another app. Open a command prompt and run netstat -anb

Try running the Visual Studio using "Run as Administrator" option.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top