What causes "Role Instances are taking longer than expected" error with Azure SDK 2.4?
Asked Answered
M

3

6

I am getting the infamous "Role Instances are taking longer than expected" error when trying to start my Azure project with a single Worker Role. It used to work before, it started failing without any apparent reasons between two debug sessions.

I tried to create a brand new solution with a new Azure project and a default Worker Role, that also fails to start.

I have found numerous other SO questions and forum posts discussing this topic, but most of them are outdated and none of their suggestions worked.

I found no relevant message in the Event Logs, the only error message I found was in C:\Users\username\AppData\Local\dftmp\EmulatorRuntimeLogs\ErrorRuntime.log, it contains lots of lines like this:

[00006892:00014472, 2014/10/16, 18:40:45.247, ERROR] Failed to create FSRM quota manager instance.

The output for the role in the Compute Emulator displays the following log indefinitely:

[fabric] Role Instance: deployment24(4).MySolution.MyProject.MySolution.MyProject.0
[fabric] Role state Busy
[fabric] Role state Aborted
[fabric] Role state Busy
[fabric] Role state Aborted
[fabric] Role state Busy
[fabric] Role state Aborted
[fabric] Role state Busy
...

Do you have any suggestions what can cause this error with the latest 2.4 version of the Azure SDK?

Mcmichael answered 16/10, 2014 at 18:45 Comment(4)
FSRM is used for LocalStorage resources, and you implicitly get a LocalStorage resource when you have <Import moduleName="Diagnostics" /> in the CSDEF. What happens if you get rid of that Diagnostics import?Hindoo
I tried that but it didn't help, and same log messages.Mcmichael
Just an update: after long hours of googling/binging, I still haven't found any solution, so I cannot use the developer environment. I am thinking about reinstalling Windows (as other people seem to have done).Mcmichael
The solution here helped me. #35392305Yvor
L
13

I solved it by removing the Startup Tasks from ServiceDefinition.csdef

Loss answered 4/3, 2015 at 13:13 Comment(2)
This should be marked as answer, at least it has helped me and my collegues a number of times.Isosteric
I am using SDK 2.4 and I don't have a startup Tasks in ServiceDefinition.csdef. Is there a solution other than this?Yvor
G
4

Change the taskType="background" in ServiceDefinition.csdef file

<Task taskType="background" executionContext="elevated" commandLine="sample.cmd">
Gluttonize answered 17/4, 2015 at 7:4 Comment(0)
Y
3

I didn't have a startup task and the following steps worked for me.

  • Right click the Azure Cloud service project
  • go to the "web" tab.
  • In the "Emulator" section choose "Use Full Emulator"
  • And in the "Local Development Server" section choose "Use IIS Web Server"

enter image description here

Yvor answered 4/3, 2016 at 16:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.