Azure Web Job Monitoring and Alert - azure

I have 1 web site and 3 Web jobs in one Windows Azure Web site (or Windows Azure Web App after the recent name change). I have all kinds of monitoring and alerts in place for the website but nothing for the Web Jobs at this point.
I am sure that Microsoft has the Web Job monitoring in their backlog but what is the recommended solution in the mean time?
In the last week, suddenly all the 3 web jobs stopped (scheduled to run continuously) around 4 AM early morning - it tries to restart but gets in to "pending restart" mode immediately. I am working with Microsoft support on this. But how do I send an alert once similar situation happens?
Any 3rd party extension already there to monitor the jobs?
Thanks

If third-party services are a consideration, look into CloudMonix # http://cloudmonix.com - it has tons of Azure-specific goodies for monitoring and automation and special support for monitoring of scheduled or on-demand Webjobs. It can also request kick-off of on-demand jobs. CloudMonix is a successor to AzureWatch, one of the early adaptors in Azure monitoring/auto-scaling space
HTH
Disclaimer: I'm affiliated with the company

Related

Why Azure app service plan restart recently?

I have a P1v2 type appservice plan instance.
It runs 3-4 nodejs application services in a containerized environment.
These application services have been completely error free for a whole year, the metrics don't show anything that would overload them, there are no application side errors either.
The appservice plan metrics are also fine.
But lately, once or twice a week I get flooded with alerts because the appservice plan restarts, so all 3-4 appservices too.
And the container startup time is around 3-4 minutes.
And in the meantime the CPU usage increases, plus there are other alerts.
Anyone have any idea what could be the reason for the restarts?
In service health , you will be get notified if there are any planned maintenance or any infrastructure update activities .
To know more information about the app service plan restart i would suggest to open discussion over Microsoft Q&A or to file a support ticket wherein technical support team would help you in troubleshooting the issue from platform end.
You refer the below blog where you can see the sample toasted email notification from Microsoft for a planned maintenance activity.

Azure cloud web apps slows load at start

Not sure if you are experiencing the slowness of Azure cloud web apps loading at start even though AlwaysOn has been turned on.
Looking for any idea to solve this issue.
Thanks,
Riki
As a workaround, we can create a Web Job that it will continue to call our web app according to a certain period, for example, every five minutes. By this way,our application pool is never unloaded and our site is always ready to serve users.
More information about Web JOB, we can refer to: Run Background tasks with WebJobs in Azure App Service
We can create a console application and upload it to Azure as our web job program. You can find how to do it with above documentation
Update:
As you said that you have turned on "Always-On", I guess the reason for this problem is the Recycling feature of IIS Application Pool.
We can disable it with this article: Avoid automatic recycle of Azure Cloud Services Web Role

How to configure Azure web Job for Always On

My web job goes on sleep after a while
and as per Microsoft docs
"A web app can time out after 20 minutes of inactivity. Only requests to the scm (deployment) site or to the web app's pages in the portal reset the timer. Requests to the actual site don't reset the timer. If your app runs continuous or scheduled WebJobs, enable Always On to ensure that the WebJobs run reliably"
but I am not able to find this setting. Thats how web job looks like in portal
Can some one please help me , how can I turn on this setting
Go to the Web App that is hosting your WebJobs and select the Application Settings menu option. The Always On setting is there.
Note that Always On is only available for Basic or greater service tiers. Free and Shared do not have this setting.

DNN 8 scheduler errros on azure web app

I remember reading that the DNN platform edition struggles with the MS Azure web app environment in regards to the scheduler tasks.
this quote comes for this DNN connect blog
The DNN Platform / Community scheduler does not support Azure Web
Sites as the server names running the web site are ever changing as
Azure scales up and down, or upgrades underlying machines. There is a
solution for Evoq.
I am getting the following scheduler errors in my DNN instances on Azure:
THREAD ID:59
TYPE:DotNetNuke.Services.Search.SearchEngineScheduler,DOTNETNUKE
EXCEPTION:Lock obtain timed out:
NativeFSLock#D:\home\site\wwwroot\App_Data\Search\write.lock
It is happening A LOT. THis is on a 08.00.04 version
I am also getting the following error on a 08.00.01 version
TYPE:DotNetNuke.Services.Scheduling.PurgeScheduleHistory, DOTNETNUKE
EXCEPTION:Execution Timeout Expired. The timeout period elapsed prior
to completion of the operation or the server is not responding.
My question is whether dnn platform's scheduler works properly in the azure web app environment, and what version saw this delivered. This will help me in getting these errors resolved.
Thanks
We often host Test and QA Evoq environments in Azure and the machine names do change, therefore require us to reactivate licensing. But these are on the Free or Shared pricing tiers. I believe if you move to Basic and above, the environment should be dedicated. You can also confirm with DNN Corp on this because their own OnDemand hosting uses Azure.
The Search write-lock error I have seen on other environments so I don't believe it's an Azure problem necessarily. For this issue, restart the app pool and delete all files in the App_Data\Search folder. Then start the site, go to Settings > Site Settings > Search and click the Re-index Content button. Then start the Site Crawler job from the scheduler. Ensure in Site Settings > Servers > Server Settings > Web Servers, that only the current server name is there -- delete any old server names. In Settings > Scheduler, edit the Search: Site Crawler task. In the Servers textbox, you can enter the name of the server so that it ensures it only runs on that server to ensure no overlap in processing (thinking it's in webfarm mode).

Can I use server side code in Windows Azure Mobile Services

I have noticed when accessing windows mobile service I can schedule tasks to perform at certain times. I also noticed that the script to perform these tasks is only javascript? Is there a way I can use some server side code to perform a mobile service?
I want to be able to connect to an API. Check for a specific update. If that update is present send an email to myself.
Unfortunately this API suffers from the same-origin policy and doesn't offer a solution like JSONP. Therefore I will need to handle this API access server side.
Currently you can only use JavaScript, but support for other languages (like C#) is planned.
I was interested in Widows Azure Mobile Services because of the Scheduler service, as a simpler alternative to jobs running in Worker Roles with Quartz and other alternatives, but I felt the same difficulty you describe in having to work in a JS only environment, which is a problem in my scenario.
Are you aware of Windows Azure Web Site Web Jobs (here and here)? You can configure continuous or scheduled jobs developed in many script languages as well as in .Net.
We moved many smaller tasks from under-utilized and more complex Worker Roles to Web Jobs as simple .Net console apps. Via the Web Jobs SDK you also get a good monitoring environment.

Resources