From owner-freebsd-questions Wed Jun 20 5: 8:37 2001 Delivered-To: freebsd-questions@freebsd.org Received: from malkav.snowmoon.com (malkav.snowmoon.com [209.23.60.62]) by hub.freebsd.org (Postfix) with SMTP id 76F7837B403 for ; Wed, 20 Jun 2001 05:08:34 -0700 (PDT) (envelope-from jaime@snowmoon.com) Received: (qmail 17831 invoked from network); 19 Jun 2001 11:08:32 -0000 Received: from localhost.snowmoon.com (HELO localhost) (127.0.0.1) by localhost.snowmoon.com with SMTP; 19 Jun 2001 11:08:32 -0000 Date: Tue, 19 Jun 2001 07:08:32 -0400 (EDT) From: Jaime To: Marius Cc: questions@FreeBSD.org Subject: Re: running out of buffer space for sockets In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 18 Jun 2001, Marius wrote: > One of my webservers is having an on-again, off-again problem with > networking. When the load gets up there (thttpd is pushing maybe 15MB > right now) I begin to run out of buffer space to create sockets. Heya old pal. :) Honestly, I think that looking at the kernel in this case is like rebuilding the foundation of a house when all that's needed is an extra layer of paint in the basement. You know, massive over kill. Look into your apache config files for something that will help. I found the following in mine: # # MaxRequestsPerChild: the number of requests each child process is # allowed to process before the child dies. The child will exit so # as to avoid problems after prolonged use when Apache (and maybe the # libraries it uses) leak memory or other resources. On most systems, this # isn't really needed, but a few (such as Solaris) do have notable leaks # in the libraries. For these platforms, set to something like 10000 # or so; a setting of 0 means unlimited. # # NOTE: This value does not include keepalive requests after the initial # request per connection. For example, if a child process handles # an initial request and 10 subsequent "keptalive" requests, it # would only count as 1 request towards this limit. # MaxRequestsPerChild 0 You should just tell apache to "recycle" child processes after they answer a certain number of requests. This will keep them from getting too big. Good luck, Jaime -- "[A]s we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously." -- Ben Franklin, http://earlyamerica.com/lives/franklin/chapt10/index.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message