0
votes

I've created a simple Azure WebJob that uses a QueueInput trigger. It deployed without any problems and I've schedule it via the management portal so that it 'Runs continuously'

Initial testing seemed fine, with the job triggering shortly after placing anything in the queue.

By chance I then left it about a day before placing anything else in the queue. This time the job hadn't triggered within a few minutes so I logged in to the portal to view the invocation logs - which showed that the job had just that moment been triggered.

That seemed too much of a coincidence so I left it another day before placing something in the queue. Again, the job didn't trigger. I left it overnight and by morning it still hadn't triggered.

When I logged in to the management portal this time I noticed that the job was marked as 'Aborted' on the WebJobs page. It was like that only for about 10 seconds before the status changed to 'Running'. And then the job immediately triggered from what was placed in the queue the night before, as expected.

As it's an alpha release I'm expecting glitches. Just wondering whether anyone else has had a similar experience.

2
Can you please share the job code?Victor Hurdugaci
Also, do you use the free tier for Web Sites or which one?Victor Hurdugaci
The WebSite is running in Shared mode rather than Free.iturner100

2 Answers

2
votes

For WebJobs SDK, your job must be running in order to listen for triggers (new queue messages, new blobs, etc). Azure Websites free tier has quotas and will put your job to sleep which means it's no longer listening on triggers. Using the site may cause it to come back to life and start listening to triggers again.

The SDK dashboard will show a warning icon next to functions if the hosting job is not running (it detects this via heartbeats).

2
votes

Make sure that your website is configured with the "Always On" setting Enabled.

If your site contains continuously running jobs they may not perform reliably if this setting is disabled.

http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/

By default, web sites are unloaded if they have been idle for some period of time. This lets the system conserve resources. You can enable the Always On setting for a site in Standard mode if the site needs to be loaded all the time. Because continuous web jobs may not run reliably if Always On is disabled, you should enable Always On when you have continuous web jobs running on the site.