Role cannot be reached by the host system Azure- WorkerRole

狂风中的少年 提交于 2019-12-04 04:24:15

try this:

Thread.CurrentThread.Priority = ThreadPriority.BelowNormal

maybe some other things(processes, threads) need lower priority's also but this should keep the cpu utilization at 100%

for (external) processes start them with the following code(this is vb but you should be able to covert it to your language

Dim myprocess As New System.Diagnostics.Process() 
myprocess.StartInfo.FileName = "C:\the\path\to\the\the\process.exe" 
myprocess.Start() 
myprocess.PriorityClass = ProcessPriorityClass.BelowNormal

you could set the priority of the current process of the worker role but this might be dependent of other processes so watch out, its better to set the priority of the demanding process lower this won't slow it down unless there is other work to be proformed

Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal

This is something that is affecting a service I'm running in a Windows Azure as well. I have just tried manually setting the Priority of WaAppAgent to High. Hopefully that helps.

But really this is shouldn't be my problem. Sometimes my database is running at 100% CPU and really this is the WORST possible time for a restart.

I really don't want to over provision resources just so some heart beat will be happy. Do the VM instances have a heart beat event as well? Maybe the solution is to switch to using a VM instead of using a PaaS role?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!