Azure / Azure/azure-functions-host

Timely custom handler got unexpectedly triggered due to `WorkerProcessRestarting`

Open
#9,195 2 comments 0 reactions 1 assignee Claimed by @brettsam View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

host json:
```
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.*, 4.0.0)"
},
"customHandler": {
"description": {
"defaultExecutablePath": "handler",
"workingDirectory": "",
"arguments": []
}
}
}
```

Log from monitor:
```
Connected!
2023-04-01T13:04:32Z [Information] Executing 'Functions.refresh_token' (Reason='Timer fired at 2023-04-01T13:04:32.4385033+00:00', Id=e238f3ed-2425-4c29-91eb-12a0f6a54cef)
2023-04-01T13:04:32Z [Information] Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2023-04-01T13:00:00.0000000+00:00
2023-04-01T13:04:32Z [Verbose] FunctionDispatcher state: WorkerProcessRestarting
2023-04-01T13:05:53Z [Information] Executing 'Functions.refresh_token' (Reason='Timer fired at 2023-04-01T13:05:52.8212382+00:00', Id=d3f30a2a-9206-4fb2-a47d-21c7a579ddfd)
2023-04-01T13:05:53Z [Information] Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2023-04-01T13:00:00.0000000+00:00
2023-04-01T13:05:53Z [Verbose] FunctionDispatcher state: WorkerProcessRestarting
2023-04-01T13:07:46Z [Information] Executing 'Functions.refresh_token' (Reason='Timer fired at 2023-04-01T13:07:46.1478211+00:00', Id=46075677-b3f4-4ed0-af11-c4b958a8aea0)
2023-04-01T13:07:46Z [Information] Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2023-04-01T13:00:00.0000000+00:00
2023-04-01T13:07:46Z [Verbose] FunctionDispatcher state: WorkerProcessRestarting
2023-04-01T13:09:40Z [Information] Executing 'Functions.refresh_token' (Reason='Timer fired at 2023-04-01T13:09:39.5749474+00:00', Id=84282f38-961c-43b0-b6db-105b7fede671)
2023-04-01T13:09:40Z [Information] Trigger Details: UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2023-04-01T13:00:00.0000000+00:00
2023-04-01T13:09:40Z [Verbose] FunctionDispatcher state: WorkerProcessRestarting
```

#### Investigative information

Please provide the following:

- Timestamp: see above
- Function App version: 4.0
- Function App name: myTimer
- Function name(s) (as appropriate):
- Invocation ID: N/A
- Region: north-europe

#### Repro steps

`func start --verbose`

#### Expected behavior

Rust handler gets triggered once per hour.

#### Actual behavior

Rust handler gets triggered within 30 seconds.

#### Known workarounds

Not that I know of, I have to stop the function app so that it won't over write to my storage account.

#### Related information

Provide any related information

* Programming language used: Rust
* Links to source
* Bindings used
```
{
"bindings": [
{
"name": "myTimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 0 * * * *",
"runOnStartup": false
}
]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.