Author |
|
awdboxer
Joined: 11 Feb 2010 Posts: 9
|
Posted: Thu 11 Feb '10 17:52 Post subject: How to increase ThreadsPerChild setting? |
|
|
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
|
Posted: Thu 11 Feb '10 18:19 Post subject: |
|
|
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
|
Posted: Thu 11 Feb '10 18:24 Post subject: |
|
|
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
|
Posted: Thu 11 Feb '10 18:40 Post subject: |
|
|
Just answered my own question 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
|
Posted: Thu 11 Feb '10 18:47 Post subject: |
|
|
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
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
|
Posted: Thu 11 Feb '10 18:49 Post subject: |
|
|
Cool, thanks for the help. |
|
Back to top |
|