Set Azure Function timeout without republishing

Published by

on

A while ago I needed to change an Azure Function timeout but I wanted to avoid, if possible, to republish it. After a little while searching I discovered this page which explain how to overwrite the values specified in the host.json file with the values specified from the Azure configuration.

The article states that if you specify a configuration value in the following format:

AzureFunctionsJobHost__path__to__setting

The runtime will replace the existing value of the path.to.setting with the one specified.

Note that the dot (.) in the setting name must be expressed as double underscore (__) when specifying the setting in the Azure configuration.

In my case I wanted to override the value of the function timeout to 1 hour so I added the following to the Azure Function configuration in the Azure portal:

AzureFunctionsJobHost__functionTimeout: 01:00:00

Hope this helps!