The following reply was made to PR general/1181; it has been noted by GNATS.
From: Charles Howes <[EMAIL PROTECTED]> To: Dean Gaudet <[EMAIL PROTECTED]> Subject: Re: general/1181: Too many virtual hosts cause cgi scripts to stop working Date: Tue, 30 Sep 1997 14:58:07 -0700 (PDT) On Tue, 30 Sep 1997, Dean Gaudet wrote: > Date: Tue, 30 Sep 1997 14:34:26 -0700 (PDT) > From: Dean Gaudet <[EMAIL PROTECTED]> > To: Charles Howes <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] > Subject: Re: general/1181: Too many virtual hosts cause cgi scripts to stop > working > > It'd be great if we could print an error in all cases, but the truth is we > can't. In fact sometimes we have no idea an error has occured because > some library routine runs into the error and doesn't report it cleanly (or > portably). I looked at printing errors a long time ago. (I thought this > was explained somewhere ... maybe it's just in > htdocs/manual/misc/descriptors.html which is probably worth reading too.) I read it, I understood it. However... So 'getpwnam()' fails but doesn't return EMFILE. Ok, fine. Then it tries 'exec()' and returns, with some error code. At this point httpd is about to return the error message 'Can't spawn child'. Fine. Just before it returns *that* error message, have it try opening /dev/null once or twice, since if it is near enough the limit to fail on getpwnam or exec, it's near enough the limit to fail on open(), which *does* return a clean, portable error. (Heck, if you can't open /dev/null, it doesn't matter *what* error code is returned, does it?) There, problem solved. You'll be putting it into the next version of Apache, yes? :-) (It'll *also* allow you to stop dealing with this frequently submitted bug report, which is worth gold right there! :-) (And it'll save countless web admins headaches as they try and find the cause of the mysterious failure of all cgi-bins on the system simultaneously...) > Under Linux if you're comfortable with recompiling your kernel you can > raise your descriptors to 1024 without seriously causing problems. See > <http://www.arctic.org/~dgaudet/patches/1024-descriptor.patch>. That's > for 2.0.x kernels. 2.1.x kernels a similar patch can be used, and they > can go far higher than 1024. > > You'll need to recompile apache after installing that kernel, and ensure > you've got the right /usr/include/linux and /usr/include/asm symlinks > before doing it. (You probably do ... it's hard to get anything done with > them wrong :) > > Dean Ok, I'll try that too! Thanks! -- Charles Howes -- [EMAIL PROTECTED]
