【问题标题】:heroku error Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launchheroku error 错误 R10(启动超时)-> Web 进程在启动后 60 秒内无法绑定到 $PORT
【发布时间】:2021-07-26 13:02:20
【问题描述】:

我用 puppeteer 做了一个刮板,但我没有指定任何端口来服务它。它只是运行并抓取数据并使用process.exit() 命令退出。

我使用 cli 将它部署到 heroku,但运行后抛出错误:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
Stopping process with SIGKILL
Process exited with status 137

怎么了?

【问题讨论】:

标签: node.js heroku puppeteer


【解决方案1】:

看起来你有一个 Web Dyno,所以应用程序必须绑定到 $PORT。

如果您不需要传入的 HTTP 请求,您可以改为定义一个工作线程(在 Procfile 中)。

【讨论】:

  • 对worker和Procfile不熟悉,可以发个例子吗?
猜你喜欢
  • 2016-03-08
  • 1970-01-01
  • 2021-08-19
  • 2015-09-14
  • 2017-06-22
  • 1970-01-01
  • 2021-04-05
  • 2021-09-03
  • 2021-05-17
相关资源
最近更新 更多