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

Re: [Libevent-users] libevent is blocking on me



Hi Niels,

I'm providing the IP and im performing a new connection per request.

every time the http handler is executed from evhttp, it performs a http query to a remote host to return data to the client's browser.

It seems that after a dozen request, it starts blocking for a 10-15 seconds, then it unblocks and so forth

while my timeout is 2 and retries is 0 so the activity appears to be inconsistent with my settings.

is it possible to do this with libevent, that is the capability of performing outgoing async connections on incoming request to check for data while accepting new connections to evhttp without them blocking?

Ron



On Mon, Jan 18, 2010 at 5:56 PM, Niels Provos <provos@xxxxxxxxx> wrote:
On Mon, Jan 18, 2010 at 12:25 PM, Ron Combs <roncombs64@xxxxxxxxx> wrote:
> inside of a http handler using evhttp, i am using evhttp_make_request to
> connect to a remote site and then i print the content.
>
> when i run many request to the evhttp server, after a few request it blocks.
>
> what im doing is it possible to do if so why is it blocking?

Hi Ron,

your email does not contain a lot of details.   Is the connection
object that you are using for a request causing name resolution?  I.e.
is the address you provide an IP address or a host name.    Do you use
a new connection for each request or do you re-use the same connection
object?   Multiple requests get queue on a connection, so it's
possible that if one requests takes longer that it seems to you that
the remaining requests are being blocked.

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