[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tpop3d-discuss]Re: bad file descriptor from select in tpop3d
From: |
Arkadiusz Miskiewicz |
Subject: |
[tpop3d-discuss]Re: bad file descriptor from select in tpop3d |
Date: |
Thu, 1 Jun 2006 09:38:31 +0200 |
User-agent: |
KMail/1.9.3 |
>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.
My limit for descriptors is set to 32768 before starting 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.
Implementing epoll support would be nicer since it's considered to be best
one.
Would replacing select code in tpop3d with libevent [1] usage be acceptable?
libevent can use select, poll, epoll and kqueue (on bsd) depending on which is
available.
>> 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...
Maybe but until that happens I get tons of ,, Bad file descriptor'' errors in
logs + the problem is that when customers get errors from pop3 server they
retry and increase load even more :)
1. http://www.monkey.org/~provos/libevent/
--
Arkadiusz MiĆkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
- [tpop3d-discuss]Re: bad file descriptor from select in tpop3d,
Arkadiusz Miskiewicz <=
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Martin Blapp, 2006/06/01
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Arkadiusz Miskiewicz, 2006/06/01
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Chris Lightfoot, 2006/06/01
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Arkadiusz Miskiewicz, 2006/06/02
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Arkadiusz Miskiewicz, 2006/06/03
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Martin Blapp, 2006/06/03
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Arkadiusz Miskiewicz, 2006/06/03
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Martin Blapp, 2006/06/03
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Arkadiusz Miskiewicz, 2006/06/03
- Re: [tpop3d-discuss]Re: bad file descriptor from select in tpop3d, Arkadiusz Miskiewicz, 2006/06/03