[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Libevent not working...

On Tue, May 8, 2012 at 7:48 AM, Shahid <shahid@xxxxxxxxxx> wrote:
> I have been using libevent in all my linux networking projects due to its
> features and AIO handling.
> I have a situation here and need your help.
> I have developed a PUSH (Comet) server using longpolling over http. I have
> used "libevent 2.0.14" for basic event handling and for http support.

That version's about 5 months old.  The latest is 2.0.19-stable.  I
don't know if any of the bugs fixed since 2.0.14-stable  apply to your
situation or not, but upgrading to the latest stable is usually a good
idea when you're trying to rule out random issues.

> I have tested the server with 250 simultaneous connections and it performed
> well on a local\private network.
> When I tested it on WAN with just 10 browsers doing the long-polling with
> it, after 20 mins the raising of events from within libevent starts getting
> delayed. The application that generates PUSH Messages for this server is
> generating 220 messages per minute. That do not seem like a huge traffic for
> libevent,  The delay is in raising the event from within libevent and it
> gets to 15 secs sometime.

This sounds pretty weird, yes.  I don' t really have enough
information to track it down from what you said, but I can suggest
some possible avenues of investigation. Are you using evhttp, or are
you using the bufferevent API or the event API directly?  Have you
tried profiling (say, with perf) to see where your program is spending
its time?  Could your program be blocking someplace (say, on a socket
that was supposed to be nonblocking but isn't)?

To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.