You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Douglas Carley <th...@gmail.com> on 2004/07/26 15:25:52 UTC

[users@httpd] ThreadsPerChild setting and Win2k

We are using apache as a load balancer to 5 back end app servers
running tomcat. Problem we are having is that under heavy load it
appears the the load balancer stops forwarding requests. We get an
error that reads like "consider raising number of threads per child"
We have load tested the box starting with 50 and adding 50 users every
15 seconds till we reach 1000 users.  We start seeing the errors after
about 400 to 450 users,. All of our servers are Win2k. Are there
limitations on Win2k in regards to threads and processes? Is there
anything I can do to enhance performance of apache on Win2k? I have
attached both httpd.conf and workers2.

Thanks.

Doug.

Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 26 Jul 2004 10:45:49 -0500, Douglas Carley
<th...@gmail.com> wrote:
> from the error log:
> 
> [Mon Jul 26 10:34:57 2004] [error] [client 10.64.133.11] File does not
> exist: C:/Program Files/Apache Group/Apache2/htdocs/server-status
> [Mon Jul 26 10:35:01 2004] [error] [client 10.64.133.11] File does not
> exist: C:/Program Files/Apache Group/Apache2/htdocs/server-status
> 
> I have no idea if mod_status is loaded...  although I am researching
> to figure out how this is done.

On win32, modules are usually dynamically loaded.  So you need to look
for a LoadModule line corresponding to mod_status and make sure it is
not commented-out.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Question about the httpd.spec for an rpm build

Posted by Joseph Oaks <tr...@trells.com>.
Hello guys, I finally got 2.0.50 to build on RHEL 3.

I am trying to configure it to our specific needs of modules and the
such. This is the normal configure I run when doing a source build.
I would like to be able to do this in the rpm build. However when
I try to add it to the configure area, the httpd -l does not show the
same as it would with a source build.

   ./configure \
   --prefix=/opt/apache/2.0.50 \
   --enable-auth --enable-dir --enable-env \
   --enable-log_config --enable-mime --enable-setenvif \
   --enable-so --enable-ssl --enable-vhost_alias \
   --enable-access --enable-cgi --enable-cgid \
   --enable-alias --enable-rewrite --enable-usertrack \
   --with-ssl --with-mpm=worker \
   --disable-actions --disable-asis --disable-auth_anon \
   --disable-auth_dbm --disable-auth_digest --disable-autoindex \
   --disable-cache --disable-cern_meta --disable-charset_lite \
   --disable-dav --disable-dav_fs --disable-deflate \
   --disable-disk_cache --disable-echo --disable-example \
   --disable-expires --disable-ext_filter --disable-file_cache \
   --disable-headers --disable-include --disable-imap \
   --disable-ldap --disable-auth_ldap \
   --disable-info --disable-isapi --disable-logio \
   --disable-mem_cache --disable-mime_magic --disable-negotiation \
   --disable-nw_ssl --disable-proxy --disable-proxy_connect \
   --disable-proxy_ftp --disable-proxy_http --disable-speling \
   --disable-status --disable-suexec --disable-unique_id \
   --disable-userdir

The source build shows the following...Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_log_config.c
  mod_env.c
  mod_usertrack.c
  mod_setenvif.c
  mod_ssl.c
  worker.c
  http_core.c
  mod_mime.c
  mod_cgid.c
  mod_cgi.c
  mod_vhost_alias.c
  mod_dir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c

Yet with the rpm build it shows...
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_so.c

Can someone tell me what I'm doing wrong? I'm still new this rpm build
stuff so I may be doing a lot of things wrong :)

Trell


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Joshua Slive <js...@gmail.com>.
On Fri, 30 Jul 2004 09:16:01 -0500, Douglas Carley
<th...@gmail.com> wrote:
> Ok, so need to add more threads, I have 4 gigs of mem in the box and
> since this is just a load balancer I was wanting to see how many
> threads I could get away with having. But I cant seem to figure out
> how to make the change take effect. I went into mpm_default.h and
> uncommented this out and changed from 1920 to 6000:

No, you don't need to do that.  Just

ThreadLimit 6000
ThreadsPerChild 6000

should work, assuming you have a relatively recent version of apache2.

Joshua

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Douglas Carley <th...@gmail.com>.
Ok, so need to add more threads, I have 4 gigs of mem in the box and
since this is just a load balancer I was wanting to see how many
threads I could get away with having. But I cant seem to figure out
how to make the change take effect. I went into mpm_default.h and
uncommented this out and changed from 1920 to 6000:

ifndef DEFAULT_THREAD_LIMIT
define DEFAULT_THREAD_LIMIT 6000
endif

and also changed httpd.conf threadsperchild setting as well to 6000.
Restart apache and nothin. I assume I am missing somthing, but cant
figure out what.

Help,
Doug.

On Tue, 27 Jul 2004 10:50:37 -0400, Joshua Slive <js...@gmail.com> wrote:
> On Tue, 27 Jul 2004 09:33:41 -0500, Douglas Carley
> <th...@gmail.com> wrote:
> > What are the maximum amount of ThreadsPerChild I can define on Win2k server?
> 
> You can go to 1920.  If you adjust ThreadLimit, you can go all the way to 15000.
> See:
> http://httpd.apache.org/docs-2.0/mod/mpm_common.html#threadlimit
> 
> But the real question is not the absolute limit, but rather how many
> can be supported in the available memory of your server.  You need to
> restrict ThreadsPerChild to a level that prevents the server from
> needing to use swap space, or you will kill your server performance.
> 
> See:
> http://httpd.apache.org/docs-2.0/misc/perf-tuning.html
> (But substitute ThreasPerChild where it talks about MaxClients.)
> 
> 
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Joshua Slive <js...@gmail.com>.
On Tue, 27 Jul 2004 09:33:41 -0500, Douglas Carley
<th...@gmail.com> wrote:
> What are the maximum amount of ThreadsPerChild I can define on Win2k server?

You can go to 1920.  If you adjust ThreadLimit, you can go all the way to 15000.
See:
http://httpd.apache.org/docs-2.0/mod/mpm_common.html#threadlimit

But the real question is not the absolute limit, but rather how many
can be supported in the available memory of your server.  You need to
restrict ThreadsPerChild to a level that prevents the server from
needing to use swap space, or you will kill your server performance.

See:
http://httpd.apache.org/docs-2.0/misc/perf-tuning.html
(But substitute ThreasPerChild where it talks about MaxClients.)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Roberto Colon <rc...@sph.emory.edu>.
Douglas Carley wrote:

>What are the maximum amount of ThreadsPerChild I can define on Win2k server?
>
>On Mon, 26 Jul 2004 14:36:04 -0400, Joshua Slive <js...@gmail.com> wrote:
>  
>
>>On Mon, 26 Jul 2004 11:19:54 -0500, Douglas Carley
>><th...@gmail.com> wrote:
>>    
>>
>>>got mod_status loaded and am able to view server-status page. I will
>>>load test again while keeping an eye on server status page. Anything
>>>special I should be looking for?
>>>      
>>>
>>Look for the state of all the child slots when you are having load
>>problems.  In particular, look at what I wrote earlier about
>>KeepAlive.
>>
>>
>>
>>Joshua.
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>
Sorry I forgot to mention that this is in a Unix platform Sun solaris 
version 9.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Douglas Carley <th...@gmail.com>.
What are the maximum amount of ThreadsPerChild I can define on Win2k server?

On Mon, 26 Jul 2004 14:36:04 -0400, Joshua Slive <js...@gmail.com> wrote:
> On Mon, 26 Jul 2004 11:19:54 -0500, Douglas Carley
> <th...@gmail.com> wrote:
> > got mod_status loaded and am able to view server-status page. I will
> > load test again while keeping an eye on server status page. Anything
> > special I should be looking for?
> 
> Look for the state of all the child slots when you are having load
> problems.  In particular, look at what I wrote earlier about
> KeepAlive.
> 
> 
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 26 Jul 2004 11:19:54 -0500, Douglas Carley
<th...@gmail.com> wrote:
> got mod_status loaded and am able to view server-status page. I will
> load test again while keeping an eye on server status page. Anything
> special I should be looking for?

Look for the state of all the child slots when you are having load
problems.  In particular, look at what I wrote earlier about
KeepAlive.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Douglas Carley <th...@gmail.com>.
got mod_status loaded and am able to view server-status page. I will
load test again while keeping an eye on server status page. Anything
special I should be looking for?

On Mon, 26 Jul 2004 10:45:49 -0500, Douglas Carley
<th...@gmail.com> wrote:
> from the error log:
> 
> [Mon Jul 26 10:34:57 2004] [error] [client 10.64.133.11] File does not
> exist: C:/Program Files/Apache Group/Apache2/htdocs/server-status
> [Mon Jul 26 10:35:01 2004] [error] [client 10.64.133.11] File does not
> exist: C:/Program Files/Apache Group/Apache2/htdocs/server-status
> 
> I have no idea if mod_status is loaded...  although I am researching
> to figure out how this is done.
> 
> Thanks for your help.
> 
> Doug.
> 
> 
> On Mon, 26 Jul 2004 11:37:25 -0400, Joshua Slive <js...@gmail.com> wrote:
> > On Mon, 26 Jul 2004 10:02:01 -0500, Douglas Carley
> > <th...@gmail.com> wrote:
> > > Tried looking at server-status report but i get 404 error. Checked
> > > httpd.conf and uncommented  out:
> > > <Location /server-status>
> > >    SetHandler server-status
> > >    Order deny,allow
> > >    deny from all
> > >    allow from .whq.sprint.com
> > > </Location>
> > > restart service and still nothing. I realize I am probably missing
> > > something easy here. I am new to apache.
> >
> > EXACTLY what are you seeing when you try to access
> > http://yourhost/server-status?  What is in the error log?  Do you have
> > the mod_status module loaded?
> >
> >
> >
> > Joshua.
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Douglas Carley <th...@gmail.com>.
from the error log:

[Mon Jul 26 10:34:57 2004] [error] [client 10.64.133.11] File does not
exist: C:/Program Files/Apache Group/Apache2/htdocs/server-status
[Mon Jul 26 10:35:01 2004] [error] [client 10.64.133.11] File does not
exist: C:/Program Files/Apache Group/Apache2/htdocs/server-status

I have no idea if mod_status is loaded...  although I am researching
to figure out how this is done.

Thanks for your help.

Doug.
On Mon, 26 Jul 2004 11:37:25 -0400, Joshua Slive <js...@gmail.com> wrote:
> On Mon, 26 Jul 2004 10:02:01 -0500, Douglas Carley
> <th...@gmail.com> wrote:
> > Tried looking at server-status report but i get 404 error. Checked
> > httpd.conf and uncommented  out:
> > <Location /server-status>
> >    SetHandler server-status
> >    Order deny,allow
> >    deny from all
> >    allow from .whq.sprint.com
> > </Location>
> > restart service and still nothing. I realize I am probably missing
> > something easy here. I am new to apache.
> 
> EXACTLY what are you seeing when you try to access
> http://yourhost/server-status?  What is in the error log?  Do you have
> the mod_status module loaded?
> 
> 
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 26 Jul 2004 10:02:01 -0500, Douglas Carley
<th...@gmail.com> wrote:
> Tried looking at server-status report but i get 404 error. Checked
> httpd.conf and uncommented  out:
> <Location /server-status>
>    SetHandler server-status
>    Order deny,allow
>    deny from all
>    allow from .whq.sprint.com
> </Location>
> restart service and still nothing. I realize I am probably missing
> something easy here. I am new to apache.

EXACTLY what are you seeing when you try to access
http://yourhost/server-status?  What is in the error log?  Do you have
the mod_status module loaded?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Douglas Carley <th...@gmail.com>.
Tried looking at server-status report but i get 404 error. Checked
httpd.conf and uncommented  out:
<Location /server-status>
   SetHandler server-status
   Order deny,allow
   deny from all
   allow from .whq.sprint.com
</Location>
restart service and still nothing. I realize I am probably missing
something easy here. I am new to apache.

On Mon, 26 Jul 2004 09:32:55 -0400, Joshua Slive <js...@gmail.com> wrote:
> On Mon, 26 Jul 2004 08:25:52 -0500, Douglas Carley
> 
> 
> <th...@gmail.com> wrote:
> > We are using apache as a load balancer to 5 back end app servers
> > running tomcat. Problem we are having is that under heavy load it
> > appears the the load balancer stops forwarding requests. We get an
> > error that reads like "consider raising number of threads per child"
> > We have load tested the box starting with 50 and adding 50 users every
> > 15 seconds till we reach 1000 users.  We start seeing the errors after
> > about 400 to 450 users,. All of our servers are Win2k. Are there
> > limitations on Win2k in regards to threads and processes? Is there
> > anything I can do to enhance performance of apache on Win2k? I have
> > attached both httpd.conf and workers2.
> 
> Please forward only the part of httpd.conf that you think are relevant
> in the future.
> 
> When you say 400 to 500 users, how many connections are these users
> creating?  Have you looked at the server-status report created by
> mod_status?  This is a good place to start.
> 
> You may find that a bunch of connections are "stuck" in keep-alive
> waiting for more requests.  In this case, turning down
> KeepAliveTimeout may help.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ThreadsPerChild setting and Win2k

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 26 Jul 2004 08:25:52 -0500, Douglas Carley
<th...@gmail.com> wrote:
> We are using apache as a load balancer to 5 back end app servers
> running tomcat. Problem we are having is that under heavy load it
> appears the the load balancer stops forwarding requests. We get an
> error that reads like "consider raising number of threads per child"
> We have load tested the box starting with 50 and adding 50 users every
> 15 seconds till we reach 1000 users.  We start seeing the errors after
> about 400 to 450 users,. All of our servers are Win2k. Are there
> limitations on Win2k in regards to threads and processes? Is there
> anything I can do to enhance performance of apache on Win2k? I have
> attached both httpd.conf and workers2.

Please forward only the part of httpd.conf that you think are relevant
in the future.

When you say 400 to 500 users, how many connections are these users
creating?  Have you looked at the server-status report created by
mod_status?  This is a good place to start.

You may find that a bunch of connections are "stuck" in keep-alive
waiting for more requests.  In this case, turning down
KeepAliveTimeout may help.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org