How to extend the timeout for Azure functions beyond the default limits - use AzureFunctionsJobHost__functionTimeout setting

by Patrick Lee on 20 May 2022 in categories BigData tech with tags AzureFunctions

By default, Azure functions timeout after 10 minutes (or 30 minutes if running in an App Service Plan, or a Premium plan).

The official documentation (see https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout) says that you can increase (or reduce) this by adding a functionTimeout value to host.json.

But this doesn't currently work for a .NET 6 Azure function (v4)  (the latest version)!

Instead, (my thanks to https://github.com/paulbatum who disclosed this trick on https://github.com/Azure/azure-functions-host/issues/6111) adding this setting AzureFunctionsJobHost__functionTimeout in app.settings.json (or in Configuration in the portal) works, e.g. for 23 hours:

"AzureFunctionsJobHost__functionTimeout": "23:00:00"