Make apache nproc rlimit not depend on role memberships
[mirror/dsa-puppet.git] / modules / apache2 / manifests / init.pp
index dfa4b59..dc19958 100644 (file)
 #                                  serving static/cheap content.  If the host is very
 #                                  script heavy (say the bug tracking system), set this
 #                                  to reduce the number of worker threads.
+# @param rlimitnproc A resource limit for number of processes.  The default is usually fine.
 class apache2(
-  Boolean $smaller_number_of_threads = false
+  Boolean $smaller_number_of_threads = false,
+  Integer $rlimitnproc = 256,
 ) {
   include webserver
 
@@ -60,12 +62,6 @@ class apache2(
   } else {
     $memlimit = 192 * 1024 * 1024
   }
-  # debbugs cgis like to fork and don't deal well with EAGAIN
-  if has_role('bugs_base') {
-    $proclimit = 450
-  } else {
-    $proclimit = 256
-  }
 
   apache2::config { 'resource-limits':
     content => template('apache2/resource-limits.erb'),