From owner-freebsd-isp Fri Dec 18 14:44:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA12713 for freebsd-isp-outgoing; Fri, 18 Dec 1998 14:44:51 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from aniwa.sky (p55-max6.wlg.ihug.co.nz [209.78.48.183]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA12702 for ; Fri, 18 Dec 1998 14:44:48 -0800 (PST) (envelope-from andrew@squiz.co.nz) Received: from localhost (andrew@localhost) by aniwa.sky (8.8.8/8.8.7) with ESMTP id LAA09290; Sat, 19 Dec 1998 11:42:59 +1300 (NZDT) (envelope-from andrew@squiz.co.nz) Date: Sat, 19 Dec 1998 11:42:58 +1300 (NZDT) From: Andrew McNaughton X-Sender: andrew@aniwa.sky Reply-To: andrew@squiz.co.nz To: Barrett Richardson cc: Marcos Viterbo , freebsd-isp@FreeBSD.ORG Subject: Re: CGI problems In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 18 Dec 1998, Barrett Richardson wrote: > On Thu, 17 Dec 1998, Andrew McNaughton wrote: > > > On Wed, 16 Dec 1998, Marcos Viterbo wrote: > > > > > Greetings. > > > > > > I am facing some problems with CGIs (freebsd_2.2.6 + apache_1.3.0). When the > > > system reaches about 55 apache instances the CGIs won't execute anymore and > > > returns a 500 error. I recompiled the kernel and libc altring > > > FD_SETSIZE=1024, maxusers=256, open_max, max_proc (child_max) in the kernel > > > and login.conf, maxconn to 256, nmbclusters=8192, recompiled apache with a > > > higher maxclients. The system has 128 MB RAM (it never goes beyond 50MB). > > > It happens only with external CGIs (PHP3 supports as many instances as the > > > apache is configured to). > > > > Sounds familiar. I had problems first with number of processes and then > > with number of file handles. > > > > It's not your system wide resources that are limited, but your per-process > > limits. If you set up a CGI like this you'll see it: > > > > #!/bin/sh > > echo Content-type: text/html > > echo > > limits > > > > My solution was to put some ulimit statements near the head of apachectl. > > > > Andrew McNaughton > > > > I was able resolve similar issues by raising some parameters in > login.conf. This has a more general effect which might or might not be good. For instance it means that cron jobs run as the user will still fork OK when there are a lot of httpd's and cgi's going. I've raised the login.conf limits a bit, but by specifying stuff per process I can give some priority to what fails first. eg log analysis fails before our cgi based publishing engine. Andrew McNaughton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message