azure-worker-roles

Role cannot be reached by the host system Azure- WorkerRole

不羁的心 提交于 2019-12-05 22:55:09
问题 I'm using the Worker Role machines (Medium -> 2 Cores with 3,5 GB of Ram) to do massive work, and I'm able to use 100% of the CPU (of both cores) and 85% of RAM. During this work, each takes around 20 minutes/ 40 minutes the Azure thinks the machine is unhealthy and stops all my work. In the Portal I see my worker instance are getting the message "Waiting for the status (Role cannot be reached by the host system). Can anyone know a work around that doesn't include: 1) Use a more power full

Azure Worker: Read a message from the Azure queue in a mutex way

时间秒杀一切 提交于 2019-12-05 20:56:06
The run method of my worker role is: public override void Run() { Message msg=null; while (true) { msg = queue.GetMessage(); if(msg!=null && msg.DequeueCount==1){ //delete message ... //execute operations ... } else if(msg!=null && msg.DequeueCount>1){ //delete message ... } else{ int randomTime = ... Thread.Sleep(randomTime); } } } For performance tests I would that a message could be analysed only by a worker (I don't consider failure problems on workers). But seems by my tests, that two workers can pick up the same message and read DequeueCount equals to 1 (both workers). Is it possible?

Is it possible to set a machinekey for an Azure Worker Role

倾然丶 夕夏残阳落幕 提交于 2019-12-05 17:55:26
I have hosted an Owin WebAPI Server in an Azure Worker Role. The Owin Authentication middleware seems to use the MachineKey to encrypt and generate Tokens. This works perfectly when I have only one instance of this role, but as soon as I want to use several instances, the tokens generated by each instance are differents. This is the same problem as a web farm, Azure automatically solves this for WebRoles using the same .net Machine Key for all instances in Web.config. But this does not work for Worker Role instances. Is there a trick to have Azure using the same machine key for all the

Azure worker role getting stuck in Role state Unknown

偶尔善良 提交于 2019-12-05 12:10:04
Azure toolkit 1.5 Create New project Add worker role Hit F5 The deployments get stuck in: [fabric] Role Instance: deployment(189).WindowsAzureProject1.WorkerRole1.0 [fabric] Role state Unknown Eventually the deployment times out. Any ideas on how to debug this? I personally solved this problem by removing *:808 binding in IIS Manager for Default Website. The required Azure assemblies may be missing from the package you are deploying to Azure. Double check that each Azure assembly your project is referencing has the copy to local property set to true. The following article may help to debug the

Azure inter-role synchronization

ぐ巨炮叔叔 提交于 2019-12-05 09:05:01
I was wondering about the best practices in synchronizing multiple azure instances that run the same role. More precisely, I want to prevent several worker roles to work on the same work-unit. Azure queues do not seem to help on this matter. One option is to use an sql table with locks and stored procedures; but using sql synchronization in Azure seems a bit awkward. Any ideas? Edit, my detailed(but simplified problem) is as follows: There are n targets. A unit of work must be done on each target at a specified interval (say 30 seconds - but it is different for each target). I have m workers

What's the concept of *worker role* in Windows Azure cloud?

放肆的年华 提交于 2019-12-05 08:34:25
As I understood, it's long running process in server. Can it cover long-running program instance like online game server? You can think of a worker role as a Windows Service or a Unix Daemon. It is, as you say, a perpetually executing process (although it may be in a wait state for a large portion of the time, but that's for you to decide). Essentially it can run any code you'd like to write. It can react to outside stimuli e.g. by polling from the Azure Queue service, but can also open communication channels, query databases, etc. 来源: https://stackoverflow.com/questions/5335789/whats-the

Facading Azure storage blob with sFTP service

会有一股神秘感。 提交于 2019-12-05 05:28:11
We have a requirement to create large (1G-16G) row data reports compress and encrypt them. Our customers will consume those reports over sFTP. We are replacing an existing implementation so our customer should get this change transparently. Azure Blob service does not expose sFTP service so we will need some way to facade it with sFTP service. Something similar to FTP to Azure Blob Storage Bridge based on worker role. The worker role will expose sFTP endpoint to the outside world. We will setup a container per customer and limit the access from worker roles only so containers will be protected

Azure Worker role Inner Exception of 'One of the request inputs is out of range.'

给你一囗甜甜゛ 提交于 2019-12-04 18:27:38
I'm calling the CloudTableClient.CreateTableIfNotExist Method in my worker role and I'm getting an exception with an Inner Exception of 'One of the request inputs is out of range.' I did a little research and found that this is caused by naming the table an illegal table name, however, I've tried name my table several different names and all have not succeeded. Some of the table names I've tried are: exceptions exceptioninfo listoferrors All of them have failed with the same error. EDIT Here is the code that I'm using to create the table: public static void InitializeTableStorage() { var

How to edit Firewall rules in code successfully on a Worker Role Instance?

谁说我不能喝 提交于 2019-12-04 16:08:18
I'm trying some code that works locally but it doesn't work on my cloud instance. I assume it may be permissions related, but I'm unable to fix it yet. Here is what I have which works when I debug my worker role locally, but nothing happens when it is published (on staging right now). string strCmdText = string.Format("advfirewall firewall add rule name=\"BlockU\" protocol=any dir=in action=block remoteip={0}", ip); ProcessStartInfo psi = new ProcessStartInfo("netsh.exe", strCmdText); psi.RedirectStandardOutput = true; psi.UseShellExecute = false; psi.CreateNoWindow = true; try { Process.Start

Cannot inject dependencies to Azure WorkerRole object using Spring.NET

有些话、适合烂在心里 提交于 2019-12-04 13:40:33
I have moderate experience in developing web applications using spring.net 4.0 , nhibernate 3.0 for ASP.net based web applications. Recently I ran into a situation where I needed to use spring.net to inject my service dependencies which belong to the WorkerRole class. I created the app.config file as I normally did with the web.config files on for spring. Here it is for clarity. (I have excluded the root nodes) <configSections> <sectionGroup name="spring"> <section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web" requirePermission="false" /> <section name="objects"