1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Rep Power

    Error:Reached MaxClients setting, for 40 users, when set to 250.


    I have configured Apache2 with Tomcat (using modjk module). I am trying to load test the server (using a load testing softare).

    I am loading 40 users, starting with 2 users, ramping 2 users every 5 seconds. The test goes on for a few iterations, ad then I start getting error. At 40 users or so, I am getting the error (error.log) :

    "[error] server reached MaxClients setting, consider raising the MaxClients setting".

    I am attaching the httpd.conf file below, please note that the maxClients =250. Can someone suggest why it is reaching 250 clients (on the server), when I am connecting only 40 users (client browsers). How can I deal with this problem? Thanks for any suggestions.

    Also I noted (ps -eaf|grep aache) that the child processes that are created do not die (even if the keep alive is off), & the child processes keep on increasing (what may be causing this/ is there any parameter to kill the idle process?).


    Contents of the httpd.conf file attached below:

    # Ha, you're reading this config file looking for the easy way out!
    # "how do I make my apache server go really really fast??"
    # Well you could start by reading the /manual/misc/perf-tuning.html
    # page. But, we'll give you a head start.
    # This config file is small, it is probably not what you'd expect on a
    # full featured internet webserver with multiple users. But it's
    # probably a good starting point for any folks interested in testing
    # performance.
    # To run this config you'll need to use something like:
    # httpd -f /usr/local/apache2/conf/highperformance.conf

    Listen 80
    ServerRoot /usr/local/apache2
    DocumentRoot /usr/local/apache2/htdocs

    User nobody
    # If you're not on Linux, you'll probably need to change Group
    Group nobody

    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    KeepAlive on

    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    MaxKeepAliveRequests 100

    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    KeepAliveTimeout 15

    <IfModule prefork.c>
    MaxClients 250
    StartServers 5
    MinSpareServers 2
    MaxSpareServers 5

    <IfModule worker.c>
    MaxClients 250
    StartServers 3
    MinSpareThreads 2
    MaxSpareThreads 5
    ThreadsPerChild 25

    # Assume no memory leaks at all
    MaxRequestsPerChild 0

    # it's always nice to know the server has started
    ErrorLog logs/error_log

    # Some benchmarks require logging, which is a good requirement. Uncomment
    # this if you need logging.
    #TransferLog logs/access_log

    <Directory />
    # The server can be made to avoid following symbolic links,
    # to make security simpler. However, this takes extra CPU time,
    # so we will just let it follow symlinks.
    Options FollowSymLinks

    # Don't check for .htaccess files in each directory - they slow
    # things down
    AllowOverride None

    # If this was a real internet server you'd probably want to
    # uncomment these:
    #order deny,allow
    #deny from all

    # If this was a real internet server you'd probably want to uncomment this:
    #<Directory "/usr/local/apache2/htdocs">
    # order allow,deny
    # allow from all

    # OK that's enough hints. Read the documentation if you want more.

    Include /export/home/cgs/jakarta-tomcat-3.3.1a/conf/mod_jk.conf
    Last edited by Hitim; January 27th, 2004 at 12:29 PM.

IMN logo majestic logo threadwatch logo seochat tools logo