process file table full?

Mike Gunter m@ryangunter.com
07 Apr 2001 10:23:43 -0700


One might think it would be best to trigger a garbage collection
before giving up and raising the exception.  Or no?

        mike


"Simon Marlow" <simonmar@microsoft.com> writes:

> > Yesterday I asked for the posssible reasons of
> > 
> > > Fail: resource exhausted
> > > Action: openFile
> > > Reason: process file table full connect-985988146.log
> > 
> > Writing that particular file wasn't the cause, but just a symptom.
> > 
> > It seems that I forgot to close filehandles obtained from 
> > Socket.accept.
> > I somehow thought they were garbage collecteted, but 
> > apparently the weren't.
> 
> They should be garbage collected and closed automatically.  But it may
> be some time between the handle becoming garbage and it finally being
> closed, so if you're accepting connections at a fast rate, it's always a
> good idea to close the handle explicitly when you finish with it.
> 
> Cheers,
> 	Simon