Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id LAA17706; Wed, 9 Jul 1997 11:36:03 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.org (8.8.5/8.8.5) with SMTP id LAA17678 for ; Wed, 9 Jul 1997 11:35:58 -0700 (PDT) Received: (qmail 22907 invoked by uid 500); 9 Jul 1997 17:15:31 -0000 Date: Wed, 9 Jul 1997 10:15:31 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: Re: memory allocations stuff (question) In-Reply-To: <9707091559.AA6900@circus.med.iacnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org This is what I was hoping for: for(;;) { begin new request (read_request_line) getrusage(); calculate usage + max_usage_per_request setrlimit(); do the request } That really only applies to the CPU usage limit though. A memory limit doesn't need to be recalculated per request. As for directive names... how about ServerRLimitXXX. It's too bad that there's no way to catch a signal when the soft limits are reached and respond with a 5XX error. Dean On Wed, 9 Jul 1997, George Carrette wrote: > stanleyg@cs.bu.edu (Stanley Gambarin) asks: > >Second: would it be reasonable to provide a limit on the maximum amount > >of memory that the server may allocate (this may prevent infinite loops > >taking down whole machine with them). The server may just exit if the > >maximum amount of memory is reached (configurable at runtime) ? > > If you apply the patches at http://cpartner.iacnet.com/apache/ > then the RLimitMEM configuration parameter used in the global > context in httpd.conf will be in effect for all children of the initial httpd > process. > > Currently the RLimitMEM parameter only applies to cgi scripts > and server-side-include exec statements. > > When a process runs out of RLimitMEM the result is that malloc returns NULL. > > I've been asked to invent new config parameter names before these > patches can be applied to the Apache sources, but I haven't been > able to think up a good name, nobody has suggested one, > and I have a preference myself to cleaning up the documentation > so that it is more carefully worded and accurate. > > > >