Hi all!
On Sun, 2020-02-16 at 08:43 +0100, Bo Lorentsen wrote:
[...]
> Sorry to write in this forum, but I have no idea as the where else to
> ask :-)
>
> I have been using libev for a while in a project at work (currently
> 4.25), with success for quite a while, and I have now expanded the usage
> in our service to also include the accepting of new connection (used
> blocking accept before).
So I infer that you use now non-blocking sockets (both for
accept() and read())
> I have a callback that gets called on every accept (where I loop on
> EAGAIN to empty the backlog), and for each new socket I make an protocol
> structure (class really). I read from the socket, and sometime it gives
> me EAGAIN and sometimes i get data, all this is working as it should,
> but !!!
>
> I did like to try our the server by using apache benchmark, and this
> worked really nice in the beginning (both localhost, and real lan), but
> when i go up to about 20k connections, and concurrency of 500 i gets a
> few sockets that I can't read from, at all. recv returns -1 and EAGAIN,
> but it never gets any data.
-1 + EAGAIN neans that there is currently nothing to read()
or accept() ATM. So far perfectly normal.
Do select()/poll() reprot before that there should be
somethign to read()/accept()?
> I order to check for any missing select errors (just a wild guess) I
select() also returns -1 (and sets errno) on errors ...
> also setup a reread timer when recv returns -1 (and EAGAIN) in order to
> try read again, even on missing read event, but data still never arrives.
>
> Are there something I am not aware of, or have others seen something
> like this ? I really appreciate any comments, I have tried google and
> found nothing useful on this specific subject.
I do not see any real bug up here anywhere.
Are you sure that each (logical) connection (in your
program) has a different file descriptor?
MfG,
Bernd
--
Bernd Petrovitsch Email : [email protected]
LUGA : http://www.luga.at
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/libev