logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to increase ThreadsPerChild setting?
Author
awdboxer



Joined: 11 Feb 2010
Posts: 9

PostPosted: Thu 11 Feb '10 17:52    Post subject: How to increase ThreadsPerChild setting? Reply with quote

I'm doing some load testing on this new webserver but I'm getting the following error: [warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting.


It looks like it's currently set at 64 worker threads. How do I increase this setting? I've researched and found there was a directive in the older versions but it's not in 2.2. Then I read about mpm, preforks, etc. This seems like it should be an easy fix, and I'm sure it is...

Apache 2.2.14
Win2k8 Server Enterprise

Any help would be greatly appreciated!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Thu 11 Feb '10 18:19    Post subject: Reply with quote

You can set this with ThreadsPerChild. For me 250 works. But is depends on the number of connection you have to the server. Test how much you need.

e.g.
Code:

ThreadsPerChild 250
Back to top
awdboxer



Joined: 11 Feb 2010
Posts: 9

PostPosted: Thu 11 Feb '10 18:24    Post subject: Reply with quote

I unremarked the Include conf/extra/httpd-mpm.conf in the httpd.conf which increased the threads to 150. I'm still hitting 0 idle workers when the load test first kicks off.

How do I find what my active mpm is? Winnt or prefork? Are there any disadvantages to maxing out the ThreadsPerChild setting?
Back to top
awdboxer



Joined: 11 Feb 2010
Posts: 9

PostPosted: Thu 11 Feb '10 18:40    Post subject: Reply with quote

Just answered my own question Smile The Winnt mpm is the only one available for Windows...makes sense haha.

Anyways I increased ThreadsPerChild to 1500 and saw it hit just under 900 so that seems like the sweet spot. However, I'm still curious to know if there's any disadvantage to keeping this setting high.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Thu 11 Feb '10 18:47    Post subject: Reply with quote

awdboxer wrote:
I'm still curious to know if there's any disadvantage to keeping this setting high.


Yepp, apache allocates some memory for it. But I don't think that is a real problem.

@Gregg: correct me if I'm wrong Wink


Last edited by James Blond on Thu 11 Feb '10 18:53; edited 1 time in total
Back to top
awdboxer



Joined: 11 Feb 2010
Posts: 9

PostPosted: Thu 11 Feb '10 18:49    Post subject: Reply with quote

Cool, thanks for the help.
Back to top


Reply to topic   Topic: How to increase ThreadsPerChild setting? View previous topic :: View next topic
Post new topic   Forum Index -> Apache