Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 781
Mark Vincze Avatar asked Dec 02 '22 15:12

Mark Vincze


2 Answers

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

like image 131
Alex A Avatar answered Dec 04 '22 03:12

Alex A


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

<Task taskType="background" executionContext="elevated" commandLine="sample.cmd">
like image 42
Ananth Yogesh Avatar answered Dec 04 '22 04:12

Ananth Yogesh