I have migrated from in-process function to isolated worker process(.net6 to .net8).
Before migration I was not getting any timout exception. On lower environments as well app didnt get any timeout and testing was successful. But on production getting "Microsoft.Azure.WebJobs.Host.FunctionTimeoutException".
I haven’t done any code logic changes, just code changes for upgrading. No changes done in host.json
I can increase the timeout value as a solution but I wanted to know why this behaviour has happened?
Please forgive my question structuring.
I have searched the net for such behaviour of function app but not getting anything specific to my question
2
Answers
Microsoft.Azure.WebJobs.Host.FunctionTimeoutException
occurs when the function exceeds its timeout limit due to various reasons during the function execution.To resolve this error, add
functionTimeout
attribute inhost.json
.00:05:00
) in consumption plan and can be increase it to 10 minutes(max).host.json:
.cproj:
Try changing the value of
FUNCTIONS_WORKER_RUNTIME
todotnet-isolated
inlocal.settings.json
. And, if you have hosted the function in Azure, do that in the Environment variables section as well.Also, upgrade the .net version to .NET 8 Isolated in the General Settings section of the Configurations, from the Azure portal.