1

In my application, we are using Apache 2.4 Windows Server.

Below is my winnt configuration

<IfModule mpm_winnt_module>
    ThreadsPerChild        1900
    MaxConnectionsPerChild 8000
</IfModule>

According to the above configuration, a new process is created in server for every 8000 requests.

In my application every day 500000 transactions are coming. What value in MaxConnectionsPerChild gives the good performance.

Below is my questions:

1. How much time its required for creating a New Process?
2. While creating the new process, If any requests comes to web server will it accept or not?
3. If the request hit reached 8000, will it drop all the current processing request or the  request will move to new process.
4. If the request hit reached 8000,  If any requests comes to web server will it accept or not?
5. Winnt module have only one process, so its good or bad to keep non zero values in MaxConnectionsPerChild ?

I didn't have the reference in internet to finding the answer for above question. Can someone please help me to get clarified on above things?

Any help will be greatly appreciated!!!

2
  • 1
    The reason you probably didn’t find many references online is that most people don’t run production with Apache httpd on a Windows platform. – HBruijn Jul 26 '19 at 8:22
  • @HBruijn, thanks for the info. I will choose the webserver wisely hereafter. – Madhesh Jul 26 '19 at 15:05
2

The short answer:

  • as winnt MPM only uses one process to spawn threads, consider using the ThreadsPerChild directive.
  • For your server leave the MaxConnectionsPerChild directive set to 0 (the default): there is no connection limit so the thread spawning process will not die.

More info from Apache documentation for winnt MPM.

ThreadsPerChild directive-:

This directive sets the number of threads created by each child process. The child creates these threads at startup and never creates more. If using an MPM like mpm_winnt, where there is only one child process, this number should be high enough to handle the entire load of the server at peak time, allowing for some contingency in case of exceptional demand.

  1. How much time its required for creating a New Process?

Depends, e.g. what processes are scheduled, what interrupts may occur, what system resources are available to manage processes. Windows process creation is expensive though.

  1. While creating the new process, If any requests comes to web server will it accept or not?

It will not accept. The child process when starting creates the threads used to process requests.

  1. If the request hit reached 8000, will it drop all the current processing request or the request will move to new process?

Neither: requests do not get moved to a new process, and there is a grace period of TimeOut seconds before active requests are terminated.

  1. If the request hit reached 8000, If any requests comes to web server will it accept or not?

If will not accept requests until the child process starts all it's worker threads.

  1. Winnt module have only one process, so its good or bad to keep non zero values?

Based on the load your server encounters keep the MaxConnectionsPerChild directive set to 0 (the default).

The MaxConnectionsPerChild directive sets the limit on the number of connections that an individual child server process will handle. After MaxConnectionsPerChild connections, the child process will die. If MaxConnectionsPerChild is 0, then the process will never expire.

6
  • thanks for the detailed explanation. Can you please guide me, the configuration of MaxConnectionPerChild. For minutes peak hours we will get 1500 transactions to process 1500 transactions we will take 12 to 18 minutes.Each transaction we will take 300 to 700 milliseconds – Madhesh Jul 26 '19 at 15:00
  • Can you please say the maximum time of process creation time. So that i can increase the MaxConnectionsPerChild value. Because i have to clarify how many transactions are not reaching to web server in that process creation time. Based on that i will increase the value – Madhesh Jul 26 '19 at 15:03
  • I edited the 5th questions, can you please explain it for me.Winnt module have only one process, so its good or bad to keep non zero values in MaxConnectionsPerChild ? – Madhesh Jul 26 '19 at 15:08
  • Thanks suspectus for answering all my questions in detail and clearly. – Madhesh Jul 26 '19 at 15:09
  • 1
    thank you so much for your valuable time to help me out.i got clarified on all my questions. Thanks – Madhesh Jul 28 '19 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.