【以下的问题经过翻译处理】 我在运行一个无服务器应用的Lambda函数时遇到了问题。我使用这个应用程序从远程节点下载文件并将其存储到S3存储桶中。之前一切都运行正常,突然间停止获取文件源位置。在调试问题时,我观察到完成一个测试事件需要很长时间。在CloudWatch日志中,我看到了以下错误日志。
***START RequestId: 052226a9-5344-45f1-88bf-5c00242baee0 Version: $LATEST END RequestId: 052226a9-5344-45f1-88bf-5c00242baee0
REPORT RequestId: 052226a9-5344-45f1-88bf-5c00242baee0 Duration: 180625.18 ms Billed Duration: 180000 ms Memory Size: 192 MB Max Memory Used: 193 MB Init Duration: 587.37 ms
XRAY TraceId: 1-626104fb-16ae94a33273f6404d180e41 SegmentId: 1010be2c3227cfab Sampled: true
REPORT RequestId: 052226a9-5344-45f1-88bf-5c00242baee0 Duration: 180625.18 ms Billed Duration: 180000 ms Memory Size: 192 MB Max Memory Used: 193 MB Init Duration: 587.37 ms XRAY TraceId: 1-626104fb-16ae94a33273f6404d180e41 SegmentId: 1010be2c3227cfab Sampled: true
2022-04-21T07:20:17.417Z 052226a9-5344-45f1-88bf-5c00242baee0 Task timed out after 180.63 seconds***
我已尝试增加内存和超时参数,但仍出现同样的错误。在 X-Ray 跟踪日志中得到了以下响应。
serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpYAWS::Lambda serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY OK 202 17ms Dwell Time OK
47ms Attempt #1 Error (4xx) 200 3.03min Attempt #2 Error (4xx) 200 3.00min Attempt #3 Error (4xx) 200 3.00min
serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpYAWS::Lambda::Function serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY Error (4xx)
3.01min Initialization OK
587ms Invocation Error (4xx)
3.01min serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY Error (4xx)
3.00min Initialization OK
611ms Invocation Error (4xx)
3.00min serverlessrepo-JumpCloud--DirectoryInsightsFunctio-fgqp218AtLpY Error (4xx)
3.00min Initialization OK
549ms Invocation Error (4xx)
3.00min
有人可以建议我是否遗漏了任何调试步骤吗?