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

Re: [Libevent-users] Re: libevent http and lost requests



On Fri, Aug 12, 2011 at 09:48:20PM +0300, about bus wrote:
> I've added some debug output in libevent functions, added "fd" (file
> descriptor) in every output message.
> messages from libevent - [warn]
> messages from my http server - v[3]
> Also I've changed timeout in nginx config from 75 to 30, it does not
> increase or decrease timeouts count.
> I've got about 0.1% timeout errors independently from timeout value.
> 
> Log output for one of timeouted requests:
> 
> 2011.08.12 21:30:02 [warn] ===    evhttp_get_request_connection: fd: 142 new
> request from 127.0.0.1:49242
> 2011.08.12 21:30:32 [warn] ===    event_active: 0x802a84480 (fd: 142), res
> 2, callback 0x8007970f0

Hrmm - looks like DNS

evhttp_get_request_connection(
        struct evhttp* http,
        evutil_socket_t fd, struct sockaddr *sa, ev_socklen_t salen)
{
        struct evhttp_connection *evcon;
        char *hostname = NULL, *portname = NULL;

        name_from_addr(sa, salen, &hostname, &portname);


eventually calling gethostbyaddr().


My guess is that it can't resolve the address. 

If this is the case, that's actually not the right thing to do (on
levent side).
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.