Skip to content

Commit

Permalink
change heartbeat timeout to a value not shared with anything else
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 4, 2017
1 parent 0c1b1ae commit e862c19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Changes
Expand Up @@ -4,8 +4,8 @@
- Added spare attribute to Mojo::Server::Prefork.
- Added -s option to prefork command.
- Added spare setting to Hypnotoad.
- Increased default graceful_timeout from 20 to 60 seconds in
Mojo::Server::Prefork.
- Increased default graceful_timeout from 20 to 60 seconds and
heartbeat_timeout from 20 to 30 seconds in Mojo::Server::Prefork.

7.34 2017-07-02
- Added short attribute to Mojo::Log.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -11,7 +11,7 @@ use Scalar::Util 'weaken';
has accepts => 10000;
has cleanup => 1;
has graceful_timeout => 60;
has heartbeat_timeout => 20;
has heartbeat_timeout => 30;
has heartbeat_interval => 5;
has pid_file => sub { path(tmpdir, 'prefork.pid')->to_string };
has spare => 2;
Expand Down Expand Up @@ -398,7 +398,7 @@ Heartbeat interval in seconds, defaults to C<5>.
$prefork = $prefork->heartbeat_timeout(2);
Maximum amount of time in seconds before a worker without a heartbeat will be
stopped gracefully, defaults to C<20>. Note that this value should usually be a
stopped gracefully, defaults to C<30>. Note that this value should usually be a
little larger than the maximum amount of time you expect any one operation to
block the event loop.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/FAQ.pod
Expand Up @@ -203,14 +203,14 @@ server closed the connection before the user agent could receive the whole
response or that the user agent got destroyed, which forces all connections to
be closed immediately.

=head2 What does "Worker 31842 has no heartbeat (20 seconds), restarting" mean?
=head2 What does "Worker 31842 has no heartbeat (30 seconds), restarting" mean?

As long as they are accepting new connections, worker processes of all built-in
pre-forking 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 C<20> seconds and can be extended with the attribute
defaults to C<30> seconds and can be extended with the attribute
L<Mojo::Server::Prefork/"heartbeat_timeout"> if your application requires it.

=head2 What does "Connection already closed" mean?
Expand Down

0 comments on commit e862c19

Please sign in to comment.