小编Mia*_*son的帖子

Alexa AWS 错误:任务在 3.00 秒后超时

我正在尝试编写一个 Alexa 技能,它使用 request.js 和cheerio.js 对数据进行一些网络抓取。

当我在本地运行它时,它按预期工作正常,但在 AWS lambda 实例上,我不断收到超时错误,因为它需要超过 3 秒才能完成运行。错误日志是这样的:

    START RequestId: 57f84024-6ef5-11e8-b49f-37c904d87c93 Version: $LATEST
2018-06-13T10:34:26.850Z    57f84024-6ef5-11e8-b49f-37c904d87c93    NEW SESSION
2018-06-13T10:34:26.851Z    57f84024-6ef5-11e8-b49f-37c904d87c93    INTENT REQUEST
2018-06-13T10:34:26.851Z    57f84024-6ef5-11e8-b49f-37c904d87c93    Sid started
2018-06-13T10:34:26.851Z    57f84024-6ef5-11e8-b49f-37c904d87c93    INTENT FOR SID HAS STARTED
2018-06-13T10:34:26.851Z    57f84024-6ef5-11e8-b49f-37c904d87c93    https://en.wikipedia.org/wiki/Chloroform
2018-06-13T10:34:26.950Z    57f84024-6ef5-11e8-b49f-37c904d87c93    SESSION END REQUEST
2018-06-13T10:34:27.731Z    57f84024-6ef5-11e8-b49f-37c904d87c93    REQUEST MADE
2018-06-13T10:34:27.731Z    57f84024-6ef5-11e8-b49f-37c904d87c93    trying to use cheerio to load page now
END RequestId: 57f84024-6ef5-11e8-b49f-37c904d87c93
REPORT RequestId: 57f84024-6ef5-11e8-b49f-37c904d87c93  Duration: 3003.16 ms    Billed Duration: 3000 ms    Memory Size: 128 MB Max Memory Used: 48 MB …
Run Code Online (Sandbox Code Playgroud)

request node.js cheerio aws-lambda alexa-skill

5
推荐指数
2
解决办法
8221
查看次数

标签 统计

alexa-skill ×1

aws-lambda ×1

cheerio ×1

node.js ×1

request ×1