You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add connect and read timeout configuration to the fetch request used in a Lambda function
Description
When using Lambda HTTP Connect we do not currently expose the read and connect timeouts. It is possible then to receive a connect timeout or a read timeout.
While in general, it is risky to make an HTTP request during a lambda function that is slow and may not be responsive - there are use cases where it may be tolerable or expected and increasing these timeouts may be valuable.
Solution
Allow connect and read timeout to be configured.
Example:
var response = fetch("https://acme.com/api/doWork", {
method: "GET",
connectTimeout: 42000, // 42,000 ms, or 42 seconds
readTimeout: 42000 // 42,000 ms, or 42 seconds
});
The default value for connectTimeout and readTimeout is 2000 ms or 2 seconds.
Add connect and read timeout configuration to the fetch request used in a Lambda function
Description
When using Lambda HTTP Connect we do not currently expose the read and connect timeouts. It is possible then to receive a connect timeout or a read timeout.
While in general, it is risky to make an HTTP request during a lambda function that is slow and may not be responsive - there are use cases where it may be tolerable or expected and increasing these timeouts may be valuable.
Solution
Allow connect and read timeout to be configured.
Example:
The default value for
connectTimeout
andreadTimeout
is2000
ms or 2 seconds.Related
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
The text was updated successfully, but these errors were encountered: