none
Timer not firing issues RRS feed

  • Question

  • I have a an Azure Function App Service that is dedicated to just timer functions. I have the exact same code deployed to the "Main" section and one slot. Timers will not fire in both at the same time. It seems to be deploy dependent. Sometimes the timer just fires in the "Main" section. Other times it just fires in the slot. I do not have a "id" defined in my host.json(s). Is there something else I need to change or look for?
    Tuesday, October 3, 2017 2:13 PM

Answers

  • I root caused this and determined that the behavior you're seeing is due to an issue on our end. I've logged a bug for that here: https://github.com/Azure/azure-webjobs-sdk-script/issues/2015.

    As the bug details, the issue is caused by the fact that your site name and slot name do not differ in their first 32 characters. No great workaround for this that I can think of unfortunately, short of using a site with a shorter name :(


    Mathew Charles [MSFT]



    Wednesday, October 11, 2017 12:03 AM

All replies

  • The behavior is very odd. I was not able to reproduce this with a new function app and a new slot. 

    Can you share your function app name? It would help narrow down the cause.

    Thanks,

    Naren


    • Edited by Naren Soni Tuesday, October 10, 2017 8:34 PM
    Monday, October 9, 2017 10:51 PM
  • Not sure what you are asking for...
    Tuesday, October 10, 2017 2:29 PM
  • I think he meant to ask you to share your Function App name, either directly or indirectly, so he can better investigate.

    David

    Tuesday, October 10, 2017 2:59 PM
  • Is Naren part of Microsoft?
    Tuesday, October 10, 2017 4:03 PM
  • Yes, he is on the Functions team as well!
    Tuesday, October 10, 2017 4:06 PM
  • Thanks. Here is a sample of one of the Timer based functions. The main and slot deployments are from the same code base.

    Region: East US

    This is the main one that is automatically firing:

    2017-10-10T16:08:30.703 Function started (Id=837f8f82-c8b4-4128-9f4e-34a59066d2a4)

    This is the one in the slot that is not currently firing:

    2017-10-10T16:10:37.265 Function started (Id=8d8f095f-6d80-434a-b80a-bf0e8bd6e8c1)


    • Edited by baparker Tuesday, October 10, 2017 4:14 PM
    Tuesday, October 10, 2017 4:14 PM
  • One thought: do you happen to have a hard coded hostid in your host.json? That would cause this behavior as the two slots would end up sharing the same timer lease. So it's best to not have that at all. i.e. host.json can be just empty: {}.
    Tuesday, October 10, 2017 4:59 PM
  • That was one of the first things I checked when I did some initial researching to see if anyone else I had encountered this issue.
    Tuesday, October 10, 2017 5:19 PM
  • I root caused this and determined that the behavior you're seeing is due to an issue on our end. I've logged a bug for that here: https://github.com/Azure/azure-webjobs-sdk-script/issues/2015.

    As the bug details, the issue is caused by the fact that your site name and slot name do not differ in their first 32 characters. No great workaround for this that I can think of unfortunately, short of using a site with a shorter name :(


    Mathew Charles [MSFT]



    Wednesday, October 11, 2017 12:03 AM