Saltstack Official Apache Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 satır
2.3KB

  1. #
  2. # This file is managed by Salt! Do not edit by hand!
  3. #
  4. {% set mpm_module = 'mpm_prefork' -%}
  5. {% set mpm_param = salt['pillar.get']('apache:mod_mpm_prefork', {}) -%}
  6. {% if pillar.get('apache:mod_mpm_worker') is defined -%}
  7. {% set mpm_module = 'mpm_worker' -%}
  8. {% set mpm_param = salt['pillar.get']('apache:mod_mpm_worker', {}) -%}
  9. {% else -%}
  10. {% endif -%}
  11. LoadModule {{ mpm_module }}_module modules/mod_{{ mpm_module }}.so
  12. # prefork MPM
  13. # StartServers: number of server processes to start
  14. # MinSpareServers: minimum number of server processes which are kept spare
  15. # ServerLimit: maximum number of server processes
  16. # MaxSpareServers: maximum number of server processes which are kept spare
  17. # MaxRequestWorkers: maximum number of server processes allowed to start
  18. # MaxConnectionsPerChild: maximum number of requests a server process serves
  19. <IfModule mpm_prefork_module>
  20. StartServers {{ mpm_param['start_servers'] | d('5') }}
  21. MaxRequestWorkers {{ mpm_param['max_request_workers'] | d('150') }}
  22. {%- if mpm_param['max_request_workers'] | d('150') | int >= 256 %}
  23. ServerLimit {{ mpm_param['max_request_workers'] | d('150') }}
  24. {%- endif %}
  25. MinSpareServers {{ mpm_param['min_spare_servers'] | d('5') }}
  26. MaxSpareServers {{ mpm_param['max_spare_servers'] | d('10') }}
  27. MaxConnectionsPerChild {{ mpm_param['max_connections_per_child'] | d('0') }}
  28. </IfModule>
  29. # worker MPM
  30. # StartServers: initial number of server processes to start
  31. # MinSpareThreads: minimum number of worker threads which are kept spare
  32. # MaxSpareThreads: maximum number of worker threads which are kept spare
  33. # ThreadsPerChild: constant number of worker threads in each server process
  34. # MaxRequestWorkers: maximum number of worker threads
  35. # MaxConnectionsPerChild: maximum number of connections a server process serves
  36. # before terminating
  37. <IfModule mpm_worker_module>
  38. StartServers {{ mpm_param['start_servers'] | d('2') }}
  39. MaxRequestWorkers {{ mpm_param['max_request_workers'] | d('150') }}
  40. MinSpareThreads {{ mpm_param['min_spare_threads'] | d('25') }}
  41. MaxSpareThreads {{ mpm_param['max_spare_threads'] | d('75') }}
  42. ThreadLimit {{ mpm_param['thread_limit'] | d('64') }}
  43. ThreadsPerChild {{ mpm_param['threads_per_child'] | d('25') }}
  44. MaxConnectionsPerChild {{ mpm_param['max_connections_per_child'] | d('0') }}
  45. </IfModule>
  46. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet