httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BipinDas-Gmail" <bipink...@gmail.com>
Subject RE: [users@httpd] Apache hangs when maximum connection beyond 2000
Date Wed, 20 May 2009 09:11:21 GMT
Thanks for your nice help. I got what the problem now..

 

Greetings ....

BipinDas

 

From: Prasanna Ram Venkatachalam [mailto:vpram86@gmail.com] 
Sent: Wednesday, May 20, 2009 11:31 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache hangs when maximum connection beyond 2000

 

Your server is using prefork only. If thats the case, at max load there
might be enormous processes getting spawned and serving requests! The
current values in prefork are not sufficient to handle this much connections
(2000)! The MaxClients is set to 256 which is much lesser compared to 2000.I
dont know how system will behave if simultaneous 2000 connections are
served! Definitely creating process is an overhead and consumes much of
system resources. I dont use prefork much in these cases :(

 

May be this will help

http://httpd.apache.org/docs/2.0/mod/mpm_common.html


 

On Wed, May 20, 2009 at 12:50 PM, BipinDas-Gmail <bipinkdas@gmail.com>
wrote:

Hi,

 

Here follows the version and build parameters of my Server. I am not much
expertise in Apache, I think I am using PREFORK.

But both worker and prefork is enabled here.

 

Server version: Apache/2.2.3

Server built:   Nov 12 2008 10:40:14

Server's Module Magic Number: 20051115:3

Server loaded:  APR 1.2.7, APR-Util 1.2.7

Compiled using: APR 1.2.7, APR-Util 1.2.7

Architecture:   64-bit

Server MPM:     Prefork

  threaded:     no

    forked:     yes (variable process count)

Server compiled with....

 -D APACHE_MPM_DIR="server/mpm/prefork"

 -D APR_HAS_SENDFILE

 -D APR_HAS_MMAP

 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)

 -D APR_USE_SYSVSEM_SERIALIZE

 -D APR_USE_PTHREAD_SERIALIZE

 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT

 -D APR_HAS_OTHER_CHILD

 -D AP_HAVE_RELIABLE_PIPED_LOGS

 -D DYNAMIC_MODULE_LIMIT=128

 -D HTTPD_ROOT="/etc/httpd"

 -D SUEXEC_BIN="/usr/sbin/suexec"

 -D DEFAULT_PIDLOG="logs/httpd.pid"

 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"

 -D DEFAULT_LOCKFILE="logs/accept.lock"

 -D DEFAULT_ERRORLOG="logs/error_log"

 -D AP_TYPES_CONFIG_FILE="conf/mime.types"

 -D SERVER_CONFIG_FILE="conf/httpd.conf"

 

Thanks for your time.

 

Greetings ....

BipinDas

 

From: Prasanna Ram Venkatachalam [mailto:vpram86@gmail.com] 
Sent: Wednesday, May 20, 2009 10:11 AM 


To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache hangs when maximum connection beyond 2000

 

First we need to figure out which model your Apache is using. If it uses
worker this setting is also fine! Please remember, in worker ServerLimit is
the maximum processes that can run simultaneously and ThreadsPerChild is the
threads running inside each process! Since in worker model, each thread will
service a request, we got a MAX of ServerLimit x ThreadsPerChild threads
having connections and servicing requests. So we can put any combination of
these to achieve our goal. 50 and 41 is just an example i gave! :)

 

<Note: if your apache is runing on windows, These two models will not be
there. Apache in Windows uses WINNT model and UNIX flavors use either of
prefork or worker)

 

On Wed, May 20, 2009 at 12:28 PM, BipinDas-Gmail <bipinkdas@gmail.com>
wrote:

Thanks Prasanna for your valuable feedback. So you recommend to change the
Serverlimit to 41 and Threads per child is 50 in worker? 

My goal is to set up this server for serving around 2000 connections
simultaneously with  minimum load. Any more changes to be needed ?

 

Thanks again.

 

Greetings ....

BipinDas

 

From: Prasanna Ram Venkatachalam [mailto:vpram86@gmail.com] 
Sent: Wednesday, May 20, 2009 4:47 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache hangs when maximum connection beyond 2000

 

Also in prefork, MaxClients is 256 (ServerLimit also) which means at max
only 256 processes can run and serve 256 connections simultaneously. In your
case 2000 well exceeds this. (i personally suggest worker rather than
prefork since for 2000 connections even if you change the settings,
processes running in the system would shoot up unneccessarily taking more
memroy).

In which model your apache is running now?

Regards
Prasanna Ram

On Wed, May 20, 2009 at 7:11 AM, Prasanna Ram Venkatachalam
<vpram86@gmail.com> wrote:

ServerLimit is 21 in worker and ThreadsPerChild is 25. So that means at MAX,
21 httpd will be running with with 25 threads each serving requests. I don't
think it will serve 2000 connections simultaneously. Can you change it to 50
and 41 and see whether it works? (just a thought)

Regards
Prasanna Ram

 

On Wed, May 20, 2009 at 2:13 AM, BipinDas-Gmail <bipinkdas@gmail.com> wrote:

Hello Everybody

 

I have a webserver running on Dell Poweredge Xeon Processor with 4GB Ram.
There is only one website a learning management system called

Moodle. Configuration of Apache is as follows.

 

This is the Prefork Module.

<IfModule prefork.c>

StartServers       8

MinSpareServers    5

MaxSpareServers   20

ServerLimit      256

MaxClients       256

MaxRequestsPerChild  4000

</IfModule>

 

 

This is the Worker Module

 

<IfModule worker.c>

StartServers         2

ServerLimit          21

MaxClients          2000 (This was before 256,I changed to 2000)

MinSpareThreads     25

MaxSpareThreads     75

ThreadsPerChild     25

MaxRequestsPerChild  0

</IfModule>

 

When the output    "netstat -tn | wc -l " goes beyond the 2000 the load of
the server will go high say above 100 and server will hang down.

I need to avoid this. So what will be the configuration to be changed to
increase the client connection above this limit. Because students 

are accessing this site across the country simultaneously from NAT mode.

 

Please help,Thanks in advance.

 

Greetings ....

BipinDas

 

 

 






-- 
Prasanna Ram






-- 
Prasanna Ram


Mime
View raw message