Subject: Re: Apache problems with NetBSD/Sparc64
To: Richard Cotrina <rcc@demo.telefonica.com.pe>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 10/19/2001 11:55:34
On Fri, 19 Oct 2001, Richard Cotrina wrote:

> I have migrated an Apache web server running in other OS , to the
> NetBSD/Sparc64 + Apache 2.0 installed form the ports.
> The previous server had around 1000 simultaneous connections, but I am
> having problems withe the apache server runnnig in the NetBSD/Sparc64 with
> the same volume of connections.
> 
> First of all, I have followed the Apache documentation in tunning the web
> server for hig performance, and I have customized my kernel with the options
> :
> 
> maxusers    256
> options         NMBCLUSTERS=4096

> And I got this messages in the error file :
> 
> [Fri Oct 19 09:18:07 2001] [warn] (54)Connection reset by peer: setsockopt:
> (TCP_NODELAY)

I believe this is unrelated; or are you getting this log often?

> [Fri Oct 19 09:23:01 2001] [error] [client a.b.c.d] (35)Resource temporarily
> unavailable: couldn't spawn child process:
> /usr/pkg/share/httpd/cgi-bin/index.cgi

What user is your Apache running as? Or what user is the Apache running
this CGI as?

For example, my nobody (and www) user's max user processes is 80 and open
file limit is 64.

How many open files? (pstat -T)

Or how many processes by the user?

Or does your system have over 4116 processes total?

You may want to start Apache after using ulimit or use sysctl to set
the limits.

Or maybe use login class capabilities for the particular user to set the
resource limits.

Also, read
http://httpd.apache.org/docs/misc/descriptors.html 

You may also want to look at the Apache directive RLimitNPROC and related
directives.

> What I also saw is a lot of TCP FIN_WAIT_2 connections in the netstat that
> don't dissapear, using the port 80 of my server.

   Jeremy C. Reed
   http://www.reedmedia.net/