gpt4 book ai didi

ruby-on-rails - 解释heroku日志, worker 是否被过早杀死?

转载 作者:行者123 更新时间:2023-12-02 21:56:43 24 4
gpt4 key购买 nike

我正在尝试调试工作人员的问题,我在日志文件中看到了此消息:

2013-07-14T21:59:07.024756+00:00 app[web.1]: E, [2013-07-14T14:59:07.024559 #2] ERROR -- : worker=1 PID:261 timeout (30s > 29s), killing
2013-07-14T21:59:07.067325+00:00 app[web.1]: E, [2013-07-14T14:59:07.066999 #2] ERROR -- : reaped #<Process::Status: pid 261 SIGKILL (signal 9)> worker=1
2013-07-14T21:59:07.070701+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path=/photos/687 host=dev.tacktile.org fwd="199.83.223.92" dyno=web.1 connect=8ms service=29345ms status=503 bytes=0
2013-07-14T21:59:07.898048+00:00 app[web.1]: I, [2013-07-14T14:59:07.897739 #269] INFO -- : worker=1 ready

如果我没看错的话,我的 worker 被杀了,因为它花费了超过 30 秒的时间。我认为只有超过 30 秒的网络响应才会被杀死。我正在将此任务放入延迟作业中并与工作人员一起处理它,因为我知道它很慢。

我希望我误会了什么。

最佳答案

您的日志显示 dyno=web.1 - 所以看起来 Web dyno 连接在 30 秒后终止,而不是像您指示的那样是工作 dyno。您读过note attached to the definition of the h13 error吗?这表明:

One example where this might happen is when a Unicorn web server is configured with a timeout shorter than 30s and a request has not been processed by a worker before the timeout happens. In this case, Unicorn closes the connection before any data is written, resulting in an H13.

也许这有关系?

PS。编辑我的答案,我看到“ worker ”你的意思是“ unicorn worker ”我猜?看起来您的 unicorn worker 因某种原因死亡(这也许就是您获得 H13 的原因)。 Heroku 不会明确终止像 AFAIK 这样的子进程。

关于ruby-on-rails - 解释heroku日志, worker 是否被过早杀死?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17644318/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com