Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webrole is not starting and always busy

I am working on a Azure Web application. The code compiles and runs fine on my local machine. But when I upload the package in Azure Platform, the webrole wouldn't start and gives Busy status with the message: "Waiting for role to start... System is initializing. [2012-04-30T09:19:08Z]"

Both Onstart() and Run() don't contain any code. I am not blocking the return of OnStart.

However I am using window.setInterval in javascript. The javascript function retrieves the values from Database every 10 seconds.

What can be done to resolve this?

like image 578
Anil Maddala Avatar asked Apr 30 '12 09:04

Anil Maddala


2 Answers

In most of the situation when a Role (Web or Worker) is stuck, I have found the following steps very useful:

  1. Always add RDP access to your role because in some cases when role is stuck you still have ability to RDP your instance and investigate the problem by yourself. In some cases you could not RDP to your instance because dependency services are not ready yet to let you in. So if you have RDP enabled or could RDP to your instance please try to log you in.

  2. Once you have RDP to your instance. Get the local machine IP address and launch directly in browser. In internal IP address starts from 10.x.x.x so you can open the browser based on your endpoint configuration i.e. http://10.x.x.x:80 or https://10.x.x.x:443

  3. If you could not get into the instance over RDP then your best bet are to get the diagnostics info to understand where the problem could be. The diagnostics info is collected in your instance and sent to Azure Storage, configured by you in your WebRole.cs (in Web Role) or WorkerRole.cs (in Worker Role) code. Once diagnostics is working in your role, you can collect the Diagnostics data at your configured Azure Blob/Table storage to understand the issue.

  4. If you don't have RDP access and don't have any Azure Diagnostics configured (or could not get any diagnostics data to understand the problem) your best bet is to contact Azure Support team (24x7 via web or phone) at the link below and they will have ability to access your instance (with your permission) and provide you root cause.

https://support.microsoft.com/oas/default.aspx?gprid=14928&st=1&wfxredirect=1&sd=gn

When contacting Azure Support, please provide your Subscription ID, Deployment ID, your Azure Live Account ID and a small description of your problem.

like image 107
AvkashChauhan Avatar answered Oct 08 '22 07:10

AvkashChauhan


Two things to check:

  1. Make sure your diagnostics connection string is pointing to a real account, and not dev storage
  2. Check the session state provider in web.config. By default, it points to SQL Express LocalDB, which won't exist in Windows Azure.
like image 31
David Makogon Avatar answered Oct 08 '22 07:10

David Makogon