Azure / Azure/azure-functions-host
Rework timeout handling for worker function load requests
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
Callers of [SendFunctionLoadRequests](https://github.com/Azure/azure-functions-host/blob/bb7e0df58189e3abac9851c67770f27d0c3fd581/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs#L286) are currently sending the value of [FunctionTimeout](https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout) which ends up getting used for the event subscription timeout of worker function load responses. FunctionTimeout shouldn't be applied here - it's a user configurable value that is used for limiting function invocation duration.
Once we remove this FunctionTimeout overloading, [this](https://github.com/Azure/azure-functions-host/blob/bb7e0df58189e3abac9851c67770f27d0c3fd581/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs#L71) value will be used. We should also lower this from 10 minutes - a function load request should never take that long. The value should be on the order of seconds usually, so a value in the range of 30s would be more appropriate. Perhaps we should run some queries to get percentiles on this and choose the right value.
This came up when reviewing these codepaths during a recent livesite.
Contributor guide
Assessment
This issue has not been assessed yet.