Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Apr 1998 12:39:25 +0100
From:      Philip Crewdson <philip@state51.co.uk>
To:        Andrew Heath <drew@bluetongue.com.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Memory Leak??? Apache, CGI, can't spawn child process
Message-ID:  <l03010d01b14a730b947b@[194.159.145.12]>
In-Reply-To: <Pine.BSF.3.96.980403195217.1028A-400000@skink.bluetongue.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>We run a webserver which supports about 50 clients, and uses alot of CGI
>developed scripts as a back end.
>
>The server seems to have some sort of memory leak, and I cannot for the
>life of me plug it.


Your problem sounds very similar to one we had which turned out to be a
cluster of configuration options not getting on very well with each other.

There's some excellent guidance on tuning a FreeBSD system for better web
server performance at http://www.apache.org/docs/misc/perf-bsd44.html

We found that tuning the kernel with the options specified really helped,
particularly setting maxusers to 256

But that didn't solve things completely. The real nub of the problem was
that requests through CGI were stacking up trying to talk to the Msql
server, and a bit of delay in the db's response caused impatient users to
click again. The processes would wait until they'd got their stuff from the
db, then try to chuck it back at a closed socket.

We did 2 things which completely sorted the situation. We optimised the
database (the developers hadn't indexed a single field on a busy public
registration service!!!), getting a faster response and fewer multiple
clicks. And we looked at /etc/login.conf and I believe we changed something
there, though I wasn't party to that conversation. The clue was that Apache
was happy spawning httpd child processes, but those children couldn't spawn
their own children for CGI.

Someone else on this list should be able to clarify this.

Paul/Philip



=============
Philip Crewdson

philip@state51.co.uk

a member of the state51 conspiracy
http://www.state51.co.uk/

raft crew
http://www.vmg.co.uk/



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



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