Jump to content
The Uniform Server Community

has anyone successfully enabled httpd-mpm.conf?


Guest bsenftner
 Share

Recommended Posts

Guest bsenftner

Earlier today I posted an issue (with solution) about using Apache bench (ab.exe) with the Uniform Server for the purpose of measuring the number of simultaneous connections that can be sustained by Apache.

 

While I was doing these tests, I saw errors from Apache Bench recommending to increase the ThreadsPerChild setting. It appears that it's default is 64.

 

Looking to increase this setting, I see that inside the Apache config file (httpd.conf) there is this line:

#Include conf/extra/httpd-mpm.conf

I tried uncommenting that line, stopping the Apache Service and restarting it. But the result of that was an nonfunctional Apache - could not load any pages.

 

I also tried simply leaving that line commented out and placing beneath a new line:

ThreadsPerChild 150

 

Viewing the apache error log it looks like my modification of ThreadsPerChild was accepted, because I see a message saying "child: starting 150 worker threads". However, no pages will load...

 

Clearly enabling this requires more than simply uncommenting that line or stating a new ThreadsPerChild value. Can anyone share how they accomplished enabling MPM?

Link to comment
Share on other sites

I do not have apache httpd-mpm.conf in my installation so I'll assume you are in an older version.

 

First you shouldn't comment that line to prevent MPM conf from loading. MPM (Multi-Processing Module) is the default for the Windows NT operating systems. It uses a single control process which launches a single child process which in turn creates threads to handle requests. That's what is broken in your install right now.

 

ThreadsPerChild 150 is fine. It will start 150 worker threads as you set in the configuration. The default value for ThreadsPerChild is 64 when used with mpm_winnt as in the case of UniServer. This directive sets the number of threads created by each child process and this number should be high enough to handle the entire load of the server.

 

The default for Coral and newer is 250 threads.

<p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p>

Link to comment
Share on other sites

Guest bsenftner

Actually, I am running Coral 8.4.0. As I write this, that is the latest version. The httpd-mpm.conf file is located at UniServer/usr/local/apache2/conf/extra/httpd-mpm.conf

 

Also, the default httpd.conf (the one enabled by default, since I've not modified any of this) has the reference to httpd-mpm.conf commented out. So, where you recommend that I should not comment it out - that's how it came. And if I uncomment that reference to include httpd-mpm.conf, apache won't serve pages anymore. (Plus, when left as delivered, that default apache configuration defaults to 64 child worker threads.)

 

What I am trying to accomplish is increasing the child worker thread count. I would love it if a fresh download of Coral 8.4.0 ran with 250 child worker threads, but it does not.

Link to comment
Share on other sites

In your config file add the following:

<IfModule mpm_winnt.c>
ThreadsPerChild 250
</IfModule>

 

Optionally you can also disable the MaxRequestPerChild if wanted

 

<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>

<p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p>

Link to comment
Share on other sites

Some notes of clarification:

First off, be sure you're using Coral_8.4.0 (or higher), since there were too many other problems in prior Coral releases.

 

Lines 569-570 of httpd.conf contains the following (I've UNcommented the line to activate it):

# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf

The httpd-mpm.conf file contains several conditional segments, but all these should be inactive except for MPM_WinNT (the last one):

<IfModule mpm_winnt_module>
ThreadsPerChild	  50
MaxRequestsPerChild	0
</IfModule>

I changed my copy to have only 50 threads while verifying whether or not this section functions properly, which it does.

When I ran Apache server-status, it showed only 50 threads. (Server configuration screen: Apache> Apache server-status). It also worked just file with 250 threads specified.

 

bsenftner, I don't know what was wrong with your copy, but I'd suggest that it was somehow corrupted.

Also, you're right, the default is 64 threads.

 

Regards,

BobS

Link to comment
Share on other sites

Guest bsenftner

 

bsenftner, I don't know what was wrong with your copy, but I'd suggest that it was somehow corrupted.

Also, you're right, the default is 64 threads.

 

Regards,

BobS

 

Thanks, bob. I'll download fresh today and verify this works as described above.

:)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...