TimerTrigger Function .NET5 starting worker process failed

Rudi Stene 21 Reputation points
2021-08-27T08:35:21.73+00:00

Trouble running Function app locally from Visual studio 2019 and 2022 Preview.
Replication steps:

  • Create new Azure Functions application
  • Select .NET5 (Isolated)
  • Create TimerTrigger using default values for storage account and schedule
  • Run application and wait for first execution
  • Stop application/debugging, and wait for at least 10 minutes before running application again
  • Function will trigger immediately (UnscheduledInvocationReason: IsPastDue), but Visual Studio hangs

Output log:
Azure Functions Core Tools
Core Tools Version: 3.0.3442 Commit hash: 6bfab24b2743f8421475d996402c398d2fe4a9e0 (64-bit)
Function Runtime Version: 3.0.15417.0

Functions:

    Function1: TimerTrigger

For detailed output, run func with --verbose flag.
[2021-08-27T08:01:16.732Z] Executing 'Functions.Function1' (Reason='Timer fired at 2021-08-27T10:01:16.7183609+02:00', Id=3ba68c0d-de4b-470d-a700-704a6e256eca)
[2021-08-27T08:01:16.734Z] Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2021-08-27T09:00:00.0000000+02:00
[2021-08-27T08:02:16.565Z] Starting worker process failed
[2021-08-27T08:02:16.569Z] The operation has timed out.
[2021-08-27T08:03:16.606Z] Starting worker process failed
[2021-08-27T08:03:16.611Z] The operation has timed out.
[2021-08-27T08:04:16.635Z] Starting worker process failed
[2021-08-27T08:04:16.638Z] The operation has timed out.
[2021-08-27T08:04:16.655Z] Exceeded language worker restart retry count for runtime:dotnet-isolated. Shutting down and proactively recycling the Functions Host to recover

Same issue when running as docker container, but no issue when running function using "func start".

Regards,
Rudi

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

Answer accepted by question author
  1. AnuragSingh-MSFT 21,566 Reputation points Moderator
    2021-08-31T12:23:09.803+00:00

    Hi @Rudi Stene ,

    This issue has already been identified as a bug which is being tracked using this Github issue.
    Please let me know if you have any questions.

    Also, as mentioned in my comment above, as a workaround you may clear the content from storage emulator so that the Visual Studio does not hang when trying to launch it locally.


2 additional answers

Sort by: Most helpful
  1. SugarBowl 1 Reputation point
    2021-09-03T19:52:57.813+00:00

    I am having the same issue ..VS 2019 and Timer Trigger ... In debug mode when I launch the application, Visual Studio hangs and get the same messages about worker process and timeout.

    0 comments No comments

  2. SugarBowl 1 Reputation point
    2021-09-03T20:02:26.507+00:00

    I a newbie to Azure ..so excuse me if I sound stupid.

    How can you clear the storage account/emulator for just your function and not others?

    Can you please provide details or links?

    THanks.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.