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

Arkadiusz Miskiewicz arekm at pld-linux.org
Thu, 1 Jun 2006 15:02:08 +0200


On Thursday 01 June 2006 09:46, Martin Blapp wrote:
> Hi,
>
> > 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.
>
> +1. We suffer on the same problem, and using libevent would definitly fix
> this issue.
I've started working on this. I already have working tpop3d which uses=20
libevent.

Example, I've started about 1500 parallel connections to tpop3d server=20
(standard compilation from cvs head) and... it stopped serving after I gues=
s=20
1024 connections (FD_SETSIZE limit probably).

Connected to localhost.
Escape character is '^]'.
(no pop3 banner)

libevent version was tested with 1800 connections and it still accepted new=
=20
ones ( + properly displaying banner and serving things). libevent was using=
=20
epoll() here.

> Martin

ps. here is proof that it works, not usable for anything else (yet)
http://ep09.pld-linux.org/~arekm/libevent1-ugly-tpop3.patch

=2D-=20
Arkadiusz Mi=B6kiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/