如何更改客户端 lambda 调用请求超时?似乎如果 Lambda 调用花费超过一分半钟,则会引发以下异常。我正在使用 .Net AmazonLambdaClient 客户端。ex=System.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.IO.IOException: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request. ---> System.Net.Sockets.SocketException: The I/O operation has been aborted because of either a thread exit or an application request
1 回答
人到中年有点甜
TA贡献1895条经验 获得超7个赞
在创建AmazonLambdaClient.
var client = new AmazonLambdaClient(
new AmazonLambdaConfig
{
Timeout = TimeSpan.FromSeconds(1000) // Default value is 100 seconds
//all other config values here
});
InvokeAsync如果您不需要等待他们返回,您可能还会查看是否可以替换您的呼叫。
- 1 回答
- 0 关注
- 106 浏览
添加回答
举报
0/150
提交
取消