question

RajAman-6780 avatar image
0 Votes"
RajAman-6780 asked PierreLucGiguere-5297 answered

Cron Azure Function (python) failing due to Container is disposed and should not be used

This is the error which i received when my Cron Azure Function executed:

Container is disposed and should not be used: Container is disposed. You may include Dispose stack-trace into the message via: container.With(rules => rules.WithCaptureContainerDisposeStackTrace())

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PierreLucGiguere-5297 avatar image
0 Votes"
PierreLucGiguere-5297 answered

Hi Raj,

Congratulations on the badges and trophies and welcome to the community.

There is an extensive Github article that deals with triggers issues:

https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing

If it does not help, please answer the following questions:

  • Are you using Consumption or App Service Plan

  • If Consumption, how did you deploy? If App Service Plan, do you have Always On enabled?

  • Are you using the v1 runtime, or the v2 (Preview) runtime?

  • Are you setting WEBSITE_TIME_ZONE?

  • What is your CRON expression set to, and what is your expectation about what it means. e.g. state "I expect it to fire every thursday at 14:17". In some cases, users just misunderstand the CRON syntax, and have incorrect expectations about the semantics of a particular expression.

  • Give a specific UTC time at which you expected your function to get called, and found that it wasn't. Also, explain how you are determining that it is not getting called. If some cases, the function may get called, but it may not be obvious due to some logging issue.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.