[tpop3d-discuss]bad file descriptor from select in tpop3d

Chris Lightfoot chris at ex-parrot.com
Wed, 31 May 2006 15:19:24 +0100


On Wed, May 31, 2006 at 04:06:07PM +0200, Daniel Tiefnig wrote:
> Arkadiusz Miskiewicz wrote:
> > Under heavy load I'm getting Bad file descriptor from select.  Any
> > ideas why it's bad here?
> 
> >From the values of the descriptors ("1024 1025 1026 1027 ..." in the
> select call) I'd guess your "open files" limit is set to 1024, and
> you're just running out of file descriptors. Try increasing the max.
> number of open files for tpop3d.

more likely the maximum number of fds in an FD_SET, I
think -- if the process had run out of fds then accept
would be returning -1 -- out-of-range file descriptors
oughtn't to get as far as select.

If that is the problem, of course, some more thought is
needed -- it might be necessary to replace select with
poll, or add more threads which can each call select.

> In bash, that would be (e.g.): ulimit -n 4096
> And after that (within the same or a child-shell) start tpop3d.
> 
> > The worse thing is that it doesn't recover from such problem.
> 
> Hmmm, it should when load decreases, I think...
> 
> 
> lg,
> daniel
> 
> _______________________________________________
> tpop3d-discuss mailing list
> tpop3d-discuss@lists.beasts.org
> http://lists.beasts.org/mailman/listinfo/tpop3d-discuss

-- 
``Humankind cannot bear very much reality.'' (Elliot)