Apache – What’s the hard limit for apache ThreadsPerChild parameter in httpd.conf

apacheibmhttpserverwebspherewebsphere-6.1websphere-7

i'm using the ibm http server which is based on Apache. When i tried to increase the parameter ThreadsPerChild more than 1000, the http server always only start up 1000 worker threads. Below is the related information:

error log:

[Thu Jul 05 10:50:45 2012] [debug] mpm_winnt.c(564): Child 9040: retrieved 2 listeners from parent
[Thu Jul 05 10:50:45 2012] [notice] Child 9040: Acquired the start mutex.
[Thu Jul 05 10:50:45 2012] [notice] Child 9040: Starting 1000 worker threads.
[Thu Jul 05 10:50:45 2012] [notice] Child 9040: Starting thread to listen on port 81.
[Thu Jul 05 10:50:45 2012] [notice] Child 9040: Starting thread to listen on port 80.

httpd.conf

<IfModule mpm_winnt.c>
  ThreadLimit 2048<br>
  ThreadsPerChild 2000
  MaxRequestsPerChild  0
</IfModule>

IHS 7.0.0.0
OS winNT

BTW, another concern with ThreadsPerChild is whether one Apache thread handles one client connection here, or one thread can take care of more than one client connection?

Please help me out.

Thanks very much

Best Answer

On limits of ThreadsPerChild setting, quoting from IBM HTTP Server Performance Tuning ;

On 64-bit Windows OS'es, each instance of is limited to approximately 2500 ThreadsPerChild. On 32-bit Windows, this number is closer to 5000. These numbers are not exact limits, because the real limits are the sum of the fixed startup cost of memory for each thread + the maximum runtime memory usage per thread, which varies based on configuration and workload. Raising ThreadsPerChild and approaching these limits risks child process crashes when runtime memory usage puts the process address space over the 2GB or 3GB barrier.

The interesting to note here is ThreadsPerChild is not the only parameter for tuning concurrent connections to IHS. You may find information about other parameters (like maxClients) and tuning methodology at the following link;

Tuning IBM HTTP Server to maximize the number of client connections to WebSphere Application Server

Related Topic