Problem
Function invocations occasionally fail with the error Function time out after.
Solutions
Try the following solutions to diagnose and resolve the issue.
Solution 1: Increase the Execution Timeout
The function may require more time than the current timeout allows. Increase the Execution Timeout for the function.
For more information, see Manage functions.
Solution 2: Check the function logic and configure logging
Check the function logic and configure logging for the function. Review the logs to determine whether the timeout coincides with a call to another API operation. Latency or delays in outbound API calls are a possible cause of timeouts.
Solution 3: Check for CPU-intensive code paths
Examine whether the function contains computationally expensive code paths, such as CPU-intensive operations. Certain input conditions can trigger heavier processing and cause the function to exceed its timeout.