Skip to content
Browse files

Merge pull request #139 from railsmachine/apache-worker-settings-addi…

…tions

Makes all the apache worker settings available to moonshine.
  • Loading branch information...
2 parents 3279a9b + 73e8fd0 commit fb217a22d8343352ed7058e5f9c924488a966dc8 @kplawver kplawver committed Nov 8, 2012
Showing with 10 additions and 5 deletions.
  1. +5 −0 lib/moonshine/manifest/rails/apache.rb
  2. +5 −5 lib/moonshine/manifest/rails/templates/apache2.conf.erb
View
5 lib/moonshine/manifest/rails/apache.rb
@@ -4,8 +4,13 @@ def self.included(manifest)
:keep_alive => 'Off',
:max_keep_alive_requests => 100,
:keep_alive_timeout => 15,
+ :start_servers => 2,
:max_clients => 150,
:server_limit => 16,
+ :min_spare_threads => 25,
+ :max_spare_threads => 75,
+ :threads_per_child => 25,
+ :max_requests_per_child => 0,
:timeout => 300,
:trace_enable => 'On',
:gzip => false,
View
10 lib/moonshine/manifest/rails/templates/apache2.conf.erb
@@ -121,13 +121,13 @@ KeepAliveTimeout <%= configuration[:apache][:keep_alive_timeout] %>
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
- StartServers 2
+ StartServers <%= configuration[:apache][:start_servers] || '2' %>
MaxClients <%= configuration[:apache][:max_clients] %>
ServerLimit <%= configuration[:apache][:server_limit] %>
- MinSpareThreads 25
- MaxSpareThreads 75
- ThreadsPerChild 25
- MaxRequestsPerChild 0
+ MinSpareThreads <%= configuration[:apache][:min_spare_threads] || '25' %>
+ MaxSpareThreads <%= configuration[:apache][:max_spare_threads] || '75' %>
+ ThreadsPerChild <%= configuration[:apache][:threads_per_child] || '25' %>
+ MaxRequestsPerChild <%= configuration[:max_requests_per_child] || '0' %>
</IfModule>
# These need to be set in /etc/apache2/envvars

0 comments on commit fb217a2

Please sign in to comment.
Something went wrong with that request. Please try again.