Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added ability to override the default number of gunicorn workers
as well as updated the default to match the gunicorn documentation:

(2 * num_cores) + 1

Source: http://docs.gunicorn.org/en/stable/design.html#how-many-workers
  • Loading branch information
steverecio committed Apr 25, 2016
commit 292f08d52943a0411248f62a95df9271f7eb5bd2
1 change: 1 addition & 0 deletions manifests/gunicorn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
$appmodule = 'app:app',
$osenv = false,
$timeout = 30,
$workers = false,
$access_log_format = false,
$accesslog = false,
$errorlog = false,
Expand Down
6 changes: 5 additions & 1 deletion templates/gunicorn.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ CONFIG = {
<% else -%>
'--bind=<%= @bind %>',
<% end -%>
'--workers=<%= @processorcount.to_i*2 %>',
<% if @workers -%>
'--workers=<%= @workers %>'
<% else -%>
'--workers=<%= @processorcount.to_i*2 + 1 %>',
<% end -%>
'--timeout=<%= @timeout %>',
<% if @access_log_format -%>
'--access-logformat=<%= @access_log_format %>',
Expand Down