1

I have a number of HTTP triggered Azure Function apps that do not time out when in production. However, when I want to debug them by stepping through the code (in Visual Studio 2022), slowly and patiently examining variable values etc., I am often unable to complete the process because the call times out.

I know that you can increase the production timeout to 10 minutes, but I would like to increase the timeout locally when I run them and I cannot find a way of doing that.

It does not appear to be an option to add an increased timeout to the local.settings.json (unlike the host.json which runs in production).

1 Answer 1

-1

You can set the functionTimeout option in the host.json file.

The host.json affects also the local development.

As described in the host.json reference for functionTimeout you can set it to:

{
    "functionTimeout": "-1"
}
Sign up to request clarification or add additional context in comments.

3 Comments

I don't believe that this is correct. host.json only runs in production. It does not affect local running of a function. (I have tried this myself and it times out but also the documentation says that local.settings.json should be used - learn.microsoft.com/en-us/azure/azure-functions/…)
I also tested it locally with a timeout of 10 seconds in the host.json file and the function timed out after 10 seconds. The documentation also says the following: host.json: This file provides a way for you to configure the Functions host. These settings apply both when running locally and in Azure. For more information, see host.json reference. You can find this here docs.azure.cn/en-us/azure-functions/…
It is strange that there is conflicting documentation. In any event, I have never managed to get this to work with -1 so that it does not timeout. I have never tested with 10 seconds because I am not interested in ten seconds. I am interested in it not timing out while debugging.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.