-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRON Function stops randomly in consumption plan #6316
Comments
Hi @crgarcia12, did you happen to delete your function app? I couldn't find it. Looking at old logs, I see that your app ran successfully until the time you mentioned, and then it stopped running the function, as you said. I see errors in the logs with functions host trying to get the lease to monitor and run your function. Timer trigger functions acquire Azure storage lease in order to identify the primary instance that should run your function when the timer goes. You can find some more doc here. My question to you is, do you know if something happened in your storage account, that was configured with the function app in a way that would interfere with lease management? |
Actually, I just realized that your function app name is fairly long (over 32 chars). Do you happen to be sharing your storage account between mutliple function apps? Or are you using slots? We have a known issue where if the function app name is longer than 32 chars, it can cause collisions in the storage account (if multiple function apps have same 32 char prefix). The collision would mean that only one of the collided function apps would have the lease I mentioned earlier. Here's the issue with more info. I am almost certain that's what is likely causing the issue. But I will wait for your response to see if you indeed have multiple apps with same prefix using the same storage, or if you are using slots. If so, you can follow the workarounds mentioned in the other issue. Thank you for reporting this! @fabiocav / @mathewc, this may be another case of Host ID collision. Just fyi. |
Yes! I am sharing the storage account! so that might be it. The function started again the next day because I manually triggered it with the "Test your function" in the portal - Thanks! |
Thanks for the confirmation! I will close this issue in favor of the other one. Please let us know if you follow-up questions and we can re-open the issue. |
Check for a solution in the Azure portal
I have multiple functions apps in different regions. I deploy the same function to all of them using
func azure functionapp publish
. Functions run for a while but then they stop firing.All the Apps share the same storage account
Investigative information
- Timestamp: 2020-07-07 05:08
- Function App version: 2.0.13900.0
- Function App name: crgar-apim-synthetictransaction-australiaeast-app
- Function name(s) (as appropriate): SyntheticTransaction
- Invocation ID: Last OperationId: 377133debf77ee4991a741fff109e639
**- Region: ** AustraliaEast, Brazil, West Europe, Central US, etc
Repro steps
My function App has this CRON expression:
public static async Task Run([TimerTrigger("0 */2 * * * *")]TimerInfo myTimer, ILogger log)
This is the function.json that I see in the portal
Diagnostics shows this report:
Last execution was one day ago
Expected behavior
Function app to run every two minutes.
Actual behavior
Function App runs several times, and then it does not get triggered anymore
Known workarounds
I can manually invoke the function (using the Test) and that seems to unblock it and start firing for a while.
Related information
*** Programming language used:** C#
*** Links to source:** https://github.com/crgarcia12/azure-apim-demo/tree/master/backend/synthetic-transactions/SyntheticTransactions
Source
The text was updated successfully, but these errors were encountered: