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

2011-08-16 Thread about bus
On Tue, Aug 16, 2011 at 6:08 PM, Mark Ellzey wrote: > OK, this makes sense. there have been issues with kqueue being broken on > older > versions of libevent (a while back, with 1.x), try falling back to either > poll or > select for now to see if it works. I still need to know what version of >

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

2011-08-16 Thread about bus
On Thu, Aug 11, 2011 at 9:19 PM, about bus wrote: > Hello! > > I have a simple my own libevent-based http server written on C, use > evhttp.h functions. > I use it like backend with nginx server (about ~2K requests per second). > Sometimes in nginx error log appears error: &qu

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

2011-08-16 Thread about bus
On Tue, Aug 16, 2011 at 4:51 AM, Mark Ellzey wrote: > On Sun, Aug 14, 2011 at 04:15:10PM +0300, about bus wrote: > > I've checked this, domain name resolution does not take much time. > > Issue somewhere between end of evhttp_socket_cb and start of > evhttp_read

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

2011-08-15 Thread about bus
On Mon, Aug 15, 2011 at 12:30 PM, Leonid Evdokimov wrote: > On Fri, Aug 12, 2011 at 22:48, about bus wrote: > > So, if everything ok with network, where libevent or maybe OS (FreeBSD > 7.2) > > holds request for 30 / 75 seconds? > > Do you use ACCEPT_FILTER in your htt

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

2011-08-14 Thread about bus
On Fri, Aug 12, 2011 at 11:36 PM, Mark Ellzey wrote: > 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 - [wa

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

2011-08-12 Thread about bus
On Fri, Aug 12, 2011 at 11:36 PM, Mark Ellzey wrote: > 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, *portn

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

2011-08-12 Thread about bus
On Fri, Aug 12, 2011 at 11:28 PM, Mark Ellzey wrote: > I have a hunch that nginx is sending some type of query that libevent > can't parse. Can you paste the entire packet for the get request from > nginx to your server? > > tcpdump -n -s0 -X, and just paste the full packet for the GET request. >

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

2011-08-12 Thread about bus
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%

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

2011-08-12 Thread about bus
On Fri, Aug 12, 2011 at 4:57 PM, Leonid Evdokimov wrote: > What libevent version do you use? > Can you reproduce the issue with ab (apache benchmark) instead of nginx? > > -- > Libevent from sources: libevent-2.0.12-stable I did not tried ab, I've tried to use http_load tool instead of real use

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

2011-08-12 Thread about bus
On Fri, Aug 12, 2011 at 1:14 PM, Jain, Deepak (GE Healthcare) < deepakj...@ge.com> wrote: > Try to use valgrind’s callgrind tool for investigating where the time has > been use. > > > The 75 seconds were lost between network (tcpdump shows what packet with GET query was successfully sent from ngin

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

2011-08-12 Thread about bus
On Fri, Aug 12, 2011 at 8:13 AM, Mark Ellzey wrote: > > Can you post the source? If not you can try ltrace/strace'ing your > server or enable event debugging by recompiling libevent with > -DUSE_DEBUG > I can't post source code. Maybe later I will make simple version of server, which can reprodu

[Libevent-users] libevent http and lost requests

2011-08-11 Thread about bus
Hello! I have a simple my own libevent-based http server written on C, use evhttp.h functions. I use it like backend with nginx server (about ~2K requests per second). Sometimes in nginx error log appears error: "(60: Operation timed out) while reading response header from upstream" Timeout value