Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 1998 10:21:01 -0400
From:      Matthew Hagerty <wpub1@net-link.net>
To:        hackers@FreeBSD.ORG
Subject:   Resource config problem
Message-ID:  <3.0.3.32.19980616102101.0076be88@smtp.net-link.net>

next in thread | raw e-mail | index | archive | help
Greetings,

If this is not technical enough for hackers then I apologize, but I posted
this in questions and did not receive any reply.  Thanks.

--------------
Could someone please help me?  I have look all over (FAQ, Handbook, list
archive, apache website, etc) for answers.

I have a server.  I am running 2.2.6-R and apache-1.2.6.  We do about 2 to
5 million requests in a 24-hour period.

We just switched from BSDI to FreeBSD and now we can only serve maybe 70
connections max.  Also, none of our cgi programs can run.  There is an
error in the apache error_log that says could not spawn child process:
resources unavailable.

I have checked the apache page on performance tips, but they are for BSDI.
They do not pertain to FreeBSD.  The tips were actually written by a tech
from BSDI.  One of the tips is to add several lines to the kernel config
like: CHILD_MAX, SOMAXCONN, etc.  But SOMAXCONN should *not* be set as an
option in the kernel.  You should use sysctl during startup (so I've been
told).  I tried this both ways, adding to the kernel and using sysctl.
Adding to the kernel does not work!  So most of the apache tips are out the
window.

I have checked the login.conf.  But I have been told that it only pertains
to users who login, not daemons started at the command line by root (like
apache).  I was also told that the daemon entry in login.conf is used to
limit programs started by the rc. files at start up.  Well, rc.local starts
my apache and I set the daemon entry to all infinity (like the root entry)
and it did not help any!  Also, what if you want (or need) to start a
daemon from the command line?  The daemon entry in login.conf would not be
much good, no?

I tried increasing the FD_SETSIZE in make.conf and recompiling libc, the
kernal, and apache.  No better.  Actually seemed to make the system a
little unstable, so I removed the line and remade libc, kernel, and apache.

Can someone tell me where I can check the limits being imposed on a runnig
process, set those limits, etc.?  Better yet, just send me a sysctl -a and
kernel config of Walnut Creek's or Yahoo's! servers.  They must have a
handle on this sort of thing.

I am going in circles and a little crazy at the same time.  This seems to
be a mystical and avoided topic.  Also, is there any reason why MAXUSERS
cannot be set higher than 256?  I have never seen anyone suggest a higher
value.  I set mine to 384 just now and I did not have any problems.  But
then again, the server is not running any better :(

Please, any help would be greatly appreciated.

Thank you,
Matthew Hagerty

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.3.32.19980616102101.0076be88>