httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject Re: leaking fd's
Date Wed, 21 Jun 1995 02:50:38 GMT
On Tue, 20 Jun 1995, Rob Hartill wrote:
> > The "403" problem definitely seems to be "too many open files" in the file
> > system, according to ktrace.  Apparently there is an fd leak happening
> > somewhere...  and killing the children doesn't seem to free them, only
> > killing the parent.  "fstat | wc -l" linearly increases with time...  RobH,
> > when you added that extra file descriptor to the CGI environment (so the
> > script can write directly to the client)... could that be adding to the
> > problem?  Where would I find that to try commenting it out? 
> Open a URL which does a printenv, you should see
> For each request, "x" should be the lowest free FD. On 0.7.3 here, it stays
> at a constant 12, even after timeout/lost connections.

It's crept up steadily throughout the day here, from in the low-20's to 
mid-50's now.  

I strongly suspect it's in the virtual host code now.  fstat showed that 
of the 54 fd's open by a particular child, 40 or so were "/var/log/httpd",
which is the default log file.  I think it's in virtual host because that 
would explain why Rob hasn't seen it on his systems.  I don't have a 
heavily-visited web site which *doesn't* use virtualhost these days, so I 
can't test this, and I also don't know the vhost code and the per-request 
structures well enough to debug this.  It also must be a particular 
condition that causes this, as it doesn't increase with every vhost 
access, or anything else predictable.

This is all with 0.7.2h - I'll be trying out 0.7.3c tonight to see how 
things go.


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--  http://www.[hyperreal,organic].com/

View raw message