[olug] Apache MaxClients and monitoring connections.

Dan Linder dan at linder.org
Tue Oct 5 21:27:48 UTC 2010


Aahh, great!  The mod_status looks like something I can use.  Thanks!

Dan

On Tue, Oct 5, 2010 at 16:17, Lane Roberts <roberts.lane at gmail.com> wrote:

> I believe mod_status is what you're looking for:
> http://httpd.apache.org/docs/2.0/mod/mod_status.html
>
> It gives more information than the `ps` route -- the number of worker
> serving requests, the number of idle workers, the status of each worker,
> the
> number of requests that worker has performed and the total number of bytes
> served by the worker, total number of accesses and byte count served, and
> so
> on.
>
> I played with it a little bit a few months ago, but I didn't really have a
> use-case for it. Actually, I just got done moving my personal sites to
> nginx
> - it's pretty slick.
>
> Like Ben said, I've never seen apache actually stop an idle process. From
> reading the comments in the config file, it looks like it should, but...
>
> /lwr
>
> On Tue, Oct 5, 2010 at 4:03 PM, Obi-Wan <obiwan at jedi.com> wrote:
> >
> > >> I'm working on sizing an Apache installation using the MaxClients
> parameter
> > >> to limit connections before it impact other shared services on this
> system.
> > >>  The Apache system will log when the MaxClients is hit, but I can't
> > >> determine how to get Apache to tell me how many clients it's currently
> > >> running.  (I'm hoping to log these numbers during their work-day and
> help
> > >> them determine a good size that balances responsiveness with the other
> tasks
> > >> on the system.)
> > >>
> > >> Is there a debug or logging option I'm missing?
> > >
> > > # ps aux | grep apache
> >
> > Or more specifically (using specifics for my install),
> >
> > # ps aux | grep /usr/sbin/apache2 | grep -c www-data
> > 15
> >
> > However, it's my impression that Apache doesn't ever actually terminate
> > an idle instance.  It starts them when necessary to field incoming
> > requests (subject to MaxClients), but when said request has been handled,
> > it leaves the instance running to save overhead the next time a request
> > comes in.  I'm not aware of any way to tell how many instances are
> > concurrently busy.  I haven't looked in a long time, but there may be
> > a way to tell idle instances to die after some period of inactivity.
> >
> > --
> > Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com
> >   The stuff of earth competes for the allegiance I owe only to the
> >     Giver of all good things, so if I stand, let me stand on the
> >       promise that You will pull me through.  -- Rich Mullins
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > https://lists.olug.org/mailman/listinfo/olug
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>



-- 
***************** ************* *********** ******* ***** *** **
"Quis custodiet ipsos custodes?"
    (Who can watch the watchmen?)
    -- from the Satires of Juvenal
"I do not fear computers, I fear the lack of them."
    -- Isaac Asimov (Author)
** *** ***** ******* *********** ************* *****************



More information about the OLUG mailing list