我已经使用claudia.js 克劳迪娅构建了一个机器人,直到今天早上我尝试推动一个更新,一切都很正常。现在脚本正在超时。
脚本
claudia create --region ap-southeast-2 --api-module index --profile xero-messenger-bot误差
creating Lambda lambda.createFunction FunctionName=my-bot
{TimeoutError: Connection timed out after 120000ms
at ClientRequest.<anonymous>
(/usr/local/lib/node_modules/claudia/node_modules/aws-sdk/lib/http/node.js:83:34)
at Object.onceWrapper (events.js:291:19)
at emitNone (events.js:86:13)
at ClientRequest.emit (events.js:186:7)
at TLSSocket.emitTimeout (_http_client.js:679:10)
at Object.onceWrapper (events.js:291:19)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:186:7)
at TLSSocket.Socket._onTimeout (net.js:342:8)
at ontimeout (timers.js:365:14)
message: 'Connection timed out after 120000ms',
code: 'NetworkingError',
time: 2017-04-20T05:48:18.230Z,
region: 'ap-southeast-2',
hostname: 'lambda.ap-southeast-2.amazonaws.com',
retryable: true
}我试过几个不同的区域(ap-东南-1,美-东-2等等),但它们似乎都犯了同样的错误。
我认为这是我的代码,但这个脚本昨天也起作用了,所以我不知道为什么今天不行。
有什么办法可以查到更多的信息吗?
发布于 2017-05-24 06:36:07
经过了太多的搜寻之后,我在Gitter的克劳迪娅氏前停了下来。@stojanovic建议我使用--use-s3-bucket标志。
claudia create --handler lambda.handler --use-s3-bucket your-bucket-name --deploy-proxy-api --region us-east-1发布于 2018-08-16 12:48:18
我知道这是一篇老文章,但一个快速的、令人讨厌的修复方法可能只是转到包,并编辑以下文件_~\node_modules\claudia\node_modules\aws-sdk\lib\http\node.js_并添加对您有效的超时:
...
AWS.NodeHttpClient = AWS.util.inherit({
handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) {
httpOptions.timeout = xxxxx (default to 120000);
...希望这有帮助
https://stackoverflow.com/questions/43511426
复制相似问题