httpd-mpm.conf 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # Server-Pool Management (MPM specific)
  3. #
  4. #
  5. # PidFile: The file in which the server should record its process
  6. # identification number when it starts.
  7. #
  8. # Note that this is the default PidFile for most MPMs.
  9. #
  10. <IfModule !mpm_netware_module>
  11. PidFile "logs/httpd.pid"
  12. </IfModule>
  13. #
  14. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  15. #
  16. <IfModule !mpm_winnt_module>
  17. <IfModule !mpm_netware_module>
  18. LockFile "logs/accept.lock"
  19. </IfModule>
  20. </IfModule>
  21. #
  22. # Only one of the below sections will be relevant on your
  23. # installed httpd. Use "apachectl -l" to find out the
  24. # active mpm.
  25. #
  26. # prefork MPM
  27. # StartServers: number of server processes to start
  28. # MinSpareServers: minimum number of server processes which are kept spare
  29. # MaxSpareServers: maximum number of server processes which are kept spare
  30. # MaxClients: maximum number of server processes allowed to start
  31. # MaxRequestsPerChild: maximum number of requests a server process serves
  32. <IfModule mpm_prefork_module>
  33. StartServers 5
  34. MinSpareServers 5
  35. MaxSpareServers 10
  36. MaxClients 150
  37. MaxRequestsPerChild 0
  38. </IfModule>
  39. # worker MPM
  40. # StartServers: initial number of server processes to start
  41. # MaxClients: maximum number of simultaneous client connections
  42. # MinSpareThreads: minimum number of worker threads which are kept spare
  43. # MaxSpareThreads: maximum number of worker threads which are kept spare
  44. # ThreadsPerChild: constant number of worker threads in each server process
  45. # MaxRequestsPerChild: maximum number of requests a server process serves
  46. <IfModule mpm_worker_module>
  47. StartServers 2
  48. MaxClients 150
  49. MinSpareThreads 25
  50. MaxSpareThreads 75
  51. ThreadsPerChild 25
  52. MaxRequestsPerChild 0
  53. </IfModule>
  54. # BeOS MPM
  55. # StartThreads: how many threads do we initially spawn?
  56. # MaxClients: max number of threads we can have (1 thread == 1 client)
  57. # MaxRequestsPerThread: maximum number of requests each thread will process
  58. <IfModule mpm_beos_module>
  59. StartThreads 10
  60. MaxClients 50
  61. MaxRequestsPerThread 10000
  62. </IfModule>
  63. # NetWare MPM
  64. # ThreadStackSize: Stack size allocated for each worker thread
  65. # StartThreads: Number of worker threads launched at server startup
  66. # MinSpareThreads: Minimum number of idle threads, to handle request spikes
  67. # MaxSpareThreads: Maximum number of idle threads
  68. # MaxThreads: Maximum number of worker threads alive at the same time
  69. # MaxRequestsPerChild: Maximum number of requests a thread serves. It is
  70. # recommended that the default value of 0 be set for this
  71. # directive on NetWare. This will allow the thread to
  72. # continue to service requests indefinitely.
  73. <IfModule mpm_netware_module>
  74. ThreadStackSize 65536
  75. StartThreads 250
  76. MinSpareThreads 25
  77. MaxSpareThreads 250
  78. MaxThreads 1000
  79. MaxRequestsPerChild 0
  80. MaxMemFree 100
  81. </IfModule>
  82. # OS/2 MPM
  83. # StartServers: Number of server processes to maintain
  84. # MinSpareThreads: Minimum number of idle threads per process,
  85. # to handle request spikes
  86. # MaxSpareThreads: Maximum number of idle threads per process
  87. # MaxRequestsPerChild: Maximum number of connections per server process
  88. <IfModule mpm_mpmt_os2_module>
  89. StartServers 2
  90. MinSpareThreads 5
  91. MaxSpareThreads 10
  92. MaxRequestsPerChild 0
  93. </IfModule>
  94. # WinNT MPM
  95. # ThreadsPerChild: constant number of worker threads in the server process
  96. # MaxRequestsPerChild: maximum number of requests a server process serves
  97. <IfModule mpm_winnt_module>
  98. ThreadsPerChild 150
  99. MaxRequestsPerChild 0
  100. </IfModule>