Skip to content

Commit 7bd16d5

Browse files
Merge pull request #213263 from satvu/satvu/additional-function-timeout-docs
Add additional documentation to functionTimeout property
2 parents 347fcf0 + 536e981 commit 7bd16d5

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

articles/azure-functions/functions-host-json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ A list of functions that the job host runs. An empty array means run all functio
292292

293293
## functionTimeout
294294

295-
Indicates the timeout duration for all functions. It follows the timespan string format.
295+
Indicates the timeout duration for all function executions. It follows the timespan string format.
296296

297297
| Plan type | Default (min) | Maximum (min) |
298298
| -- | -- | -- |

articles/azure-functions/performance-reliability.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ A function can become large because of many Node.js dependencies. Importing depe
2020

2121
Whenever possible, refactor large functions into smaller function sets that work together and return responses fast. For example, a webhook or HTTP trigger function might require an acknowledgment response within a certain time limit; it's common for webhooks to require an immediate response. You can pass the HTTP trigger payload into a queue to be processed by a queue trigger function. This approach lets you defer the actual work and return an immediate response.
2222

23+
## Make sure background tasks complete
24+
25+
When your function starts any tasks, callbacks, threads, processes, or tasks, they must complete before your function code returns. Because Functions doesn't track these background threads, site shutdown can occur regardless of background thread status, which can cause unintended behavior in your functions.
26+
27+
For example, if a function starts a background task and returns a successful response before the task completes, the Functions runtime considers the execution as having completed successfully, regardless of the result of the background task. If this background task is performing essential work, it may be preempted by site shutdown, leaving that work in an unknown state.
28+
2329
## Cross function communication
2430

2531
[Durable Functions](durable/durable-functions-overview.md) and [Azure Logic Apps](../logic-apps/logic-apps-overview.md) are built to manage state transitions and communication between multiple functions.

includes/functions-timeout-duration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ ms.author: glenga
77
---
88
## <a name="timeout"></a>Function app timeout duration
99

10-
The timeout duration of a function app is defined by the `functionTimeout` property in the [host.json](../articles/azure-functions/functions-host-json.md#functiontimeout) project file. The following table shows the default and maximum values (in minutes) for specific plans:
10+
The timeout duration for functions in a function app is defined by the `functionTimeout` property in the [host.json](../articles/azure-functions/functions-host-json.md#functiontimeout) project file. This property applies specifically to function executions. After the trigger starts function execution, the function needs to return/respond within the timeout duration. For more information, see [Improve Azure Functions performance and reliability](../articles/azure-functions/performance-reliability.md#make-sure-background-tasks-complete).
11+
12+
The following table shows the default and maximum values (in minutes) for specific plans:
1113

1214
| Plan | Default | Maximum<sup>1</sup> |
1315
|------|---------|---------|---------|

0 commit comments

Comments
 (0)