【问题标题】:Heroku crashes when fetching ImageHeroku 在获取图像时崩溃
【发布时间】:2021-05-04 00:04:35
【问题描述】:

我在 heroku 上运行我的 NodeJS 服务器。

我的网站从运行在 heroku 上的 nodejs 服务器每次连接都会获取大量图像 100。

有时正在获取图像(查看下面的错误代码)并且服务器崩溃。

几天以来,heroku 服务器每天崩溃 (10k)。我从来没有遇到过这个问题,也没有做任何改变,也没有大的流量增加。

内存使用率很低,512mb 中有 128mb,Dyno 负载也很低。

图像存储在 heroku 服务器上。

错误如下。

2021-05-02T18:56:44.339537+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/images/icons/thumb/raw/cosmos.png" host=www.X.com request_id=0ee560ac-3308-415f-bb4a-03a387523220 fwd="46.97.168.10,141.101.76.190" dyno= connect= service= status=503 bytes= protocol=http   

2021-05-02T18:56:44.343251+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/images/icons/thumb/raw/avalanche-2.png" host=www.X.com request_id=199d8bdb-8018-43e7-9a29-396fd3b51779 fwd="46.97.168.10,172.69.55.106" dyno= connect= service= status=503 bytes= protocol=http

2021-05-02T18:56:46.733391+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/images/icons/thumb/raw/siacoin.png" host=www.X.com request_id=9a721235-c00f-439f-87a0-a8508cb81f40 fwd="46.97.168.10,172.69.55.161" dyno= connect= service= status=503 bytes= protocol=http

有什么建议可以解决这个问题,或者在获取图像时尝试一下?

【问题讨论】:

    标签: node.js heroku


    【解决方案1】:

    由于应用崩溃或启动超时,您的应用显示 H10 错误。这可能是由于您的应用在获取图像期间显示错误。尝试对图像使用 try catch。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-01
      • 2017-05-27
      相关资源
      最近更新 更多