mojolicious - 如何解决催眠工作人员的故障

标签 mojolicious

我有一个由 Hypnotoad 提供的应用程序,没有反向代理。它有 15 个工作人员,每个允许 2 个客户端。该应用程序在前台模式下通过催眠启动。

我在 log/production.log 中看到以下内容:

[Wed Apr  1 16:28:12 2015] [error] Worker 119914 has no heartbeat, restarting.
[Wed Apr  1 16:28:21 2015] [error] Worker 119910 has no heartbeat, restarting.
[Wed Apr  1 16:28:21 2015] [error] Worker 119913 has no heartbeat, restarting.
[Wed Apr  1 16:28:22 2015] [error] Worker 119917 has no heartbeat, restarting.
[Wed Apr  1 16:28:22 2015] [error] Worker 119909 has no heartbeat, restarting.
[Wed Apr  1 16:28:27 2015] [error] Worker 119907 has no heartbeat, restarting.
[Wed Apr  1 16:28:34 2015] [error] Worker 119905 has no heartbeat, restarting.
[Wed Apr  1 16:28:42 2015] [error] Worker 119904 has no heartbeat, restarting.
[Wed Apr  1 16:30:12 2015] [error] Worker 119912 has no heartbeat, restarting.
[Wed Apr  1 16:31:23 2015] [error] Worker 119918 has no heartbeat, restarting.
[Wed Apr  1 16:32:18 2015] [error] Worker 119911 has no heartbeat, restarting.
[Wed Apr  1 16:32:22 2015] [error] Worker 119916 has no heartbeat, restarting.

但是, worker 永远不会重新启动。

当我运行 strace 时,管理器进程似乎勇敢地试图杀死(现已过期) worker :
Process 119878 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
kill(119906, SIGKILL)                   = 0
kill(119917, SIGKILL)                   = 0
kill(119905, SIGKILL)                   = 0
kill(119910, SIGKILL)                   = 0
kill(119904, SIGKILL)                   = 0
kill(119914, SIGKILL)                   = 0
kill(119916, SIGKILL)                   = 0
kill(119908, SIGKILL)                   = 0
kill(119913, SIGKILL)                   = 0
kill(119915, SIGKILL)                   = 0
kill(119918, SIGKILL)                   = 0
kill(119912, SIGKILL)                   = 0
kill(119909, SIGKILL)                   = 0
kill(119911, SIGKILL)                   = 0
kill(119907, SIGKILL)                   = 0
stat("/xxx/xxx/xxx/hypnotoad.pid", {st_mode=S_IFREG|0644, st_size=6, ...}) = 0
poll([{fd=4, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
kill(119906, SIGKILL)                   = 0
kill(119917, SIGKILL)                   = 0
kill(119905, SIGKILL)                   = 0
kill(119910, SIGKILL)                   = 0
kill(119904, SIGKILL)                   = 0
kill(119914, SIGKILL)                   = 0
kill(119916, SIGKILL)                   = 0
kill(119908, SIGKILL)                   = 0
kill(119913, SIGKILL)                   = 0
kill(119915, SIGKILL)                   = 0
kill(119918, SIGKILL)                   = 0
kill(119912, SIGKILL)                   = 0
kill(119909, SIGKILL)                   = 0
kill(119911, SIGKILL)                   = 0
kill(119907, SIGKILL)                   = 0
stat("/xxx/xxx/xxx/hypnotoad.pid", {st_mode=S_IFREG|0644, st_size=6, ...}) = 0
poll([{fd=4, events=POLLIN|POLLPRI}], 1, 1000^C <unfinished ...>
Process 119878 detached

我怎样才能进一步解决这个问题以确定:
  • 为什么催眠蟾​​蜍认为它仍然需要杀死不存在的
    流程?
  • 为什么不开始新的?
  • 最佳答案

    What does "Worker 31842 has no heartbeat, restarting" mean?

    As long as they are accepting new connections, worker processes of all built-in preforking web servers send heartbeat messages to the manager process at regular intervals, to signal that they are still responsive. A blocking operation such as an infinite loop in your application can prevent this, and will force the affected worker to be restarted after a timeout. This timeout defaults to 20 seconds and can be extended with the attribute "heartbeat_timeout" in Mojo::Server::Prefork if your application requires it.


    http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#What-does-Worker-31842-has-no-heartbeat-restarting-mean

    关于mojolicious - 如何解决催眠工作人员的故障,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29401499/

    相关文章:

    perl - Mojolicious:传递选择字段 HTML 片段

    mysql - 如何锁定 DBIx :Class? 中的表

    perl - 如何确定未定义 $VERSION 的已安装 Perl 模块的版本?

    perl - 如何在 Mojolicious 应用程序的单元测试中伪造客户端 IP 地址?

    perl - 将变量传递给 Mojolicious 中的布局模板

    javascript - Mojo::UserAgent 和 JavaScript

    perl - 如何在 Mojolicious 中测试重定向?

    perl - 如何定义 Mojo::Server::Prefork 的生成处理程序?

    perl - 打包和部署 mojolicious 应用程序的最佳方式

    perl - 如何调试用于从客户端上传文件的服务器端脚本(在此示例中为 curl)?