Maxim Kitsenko
Maxim Kitsenko

Reputation: 2333

Azure function freezes

I have 15 azure functions in one project. I noticied that 2 of them freeze in azure cloud. Functions should be triggered by timer "schedule": "0 */1 * * * *" every minute, but from what i see in azure they called more rarely. I tried to change scedule, but the problem still exists. What could be the reason of this freez? enter image description here

Upvotes: 0

Views: 987

Answers (4)

Maxim Kitsenko
Maxim Kitsenko

Reputation: 2333

Looks like the problem was in awaiting context async operation. I added configureAwait(false) to all async calls, and it started to work correctly.enter image description here

I was surprissed, because i thought configureAwait(false) was relavant only in ASP.NET applications

Upvotes: 0

Kashyap
Kashyap

Reputation: 17411

Azure Functions use NCRON not CRON .

Your expression is designed to run every hour's first minute not every minute. I'm not sure how it's running at the times you show in the screen shot, but sounds impossible and would guess the screen shot and ncron expression are not from same function.

Upvotes: 0

Change your CRON expression to "0 * * * * *" for the function to be triggered every minute.

Upvotes: 1

Thiago Custodio
Thiago Custodio

Reputation: 18387

The trigger only happen if there's not a previous execution running. So that could be the reason, your function is taking more than one minute to complete. More info about it:

https://github.com/Azure/azure-webjobs-sdk-extensions/issues/84

Upvotes: 1

Related Questions