Skip to content

Commit

Permalink
restart workers a little slower by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 4, 2016
1 parent 72dd2fe commit 260984f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -8,6 +8,7 @@
- Added single_accept option to Mojo::IOLoop::Server::listen.
- Added single_accept parameter to Mojo::Server::Daemon::listen.
- Increased default max_requests from 25 to 100 in Mojo::Server::Daemon.
- Increased default accepts from 1000 to 10000 in Mojo::Server::Prefork.
- Improved performance of many Mojo::Util functions slightly.
- Fixed default value bug in val method of Mojo::DOM.

Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -6,7 +6,7 @@ use Mojo::Util 'steady_time';
use POSIX 'WNOHANG';
use Scalar::Util 'weaken';

has accepts => 1000;
has accepts => 10000;
has cleanup => 1;
has [qw(graceful_timeout heartbeat_timeout)] => 20;
has heartbeat_interval => 5;
Expand Down Expand Up @@ -360,7 +360,7 @@ and implements the following new ones.
Maximum number of connections a worker is allowed to accept, before stopping
gracefully and then getting replaced with a newly started worker, passed along
to L<Mojo::IOLoop/"max_accepts">, defaults to C<1000>. Setting the value to
to L<Mojo::IOLoop/"max_accepts">, defaults to C<10000>. Setting the value to
C<0> will allow workers to accept new connections indefinitely. Note that up to
half of this value can be subtracted randomly to improve load balancing.
Expand Down

0 comments on commit 260984f

Please sign in to comment.