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

2011-08-16 Thread Mark Ellzey
On Tue, Aug 16, 2011 at 06:24:08PM +0300, about bus wrote: > 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 > > s

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 >

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

2011-08-16 Thread Mark Ellzey
On Tue, Aug 16, 2011 at 05:59:19PM +0300, about bus wrote: > I've added debug output to next libevent functions: > * event_add - add file descriptor to kqueue for monitoring network activity. > * kq_dispatch - return file descriptor when event appeared on it. > > ### Previous request which used th

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

2011-08-16 Thread Mark Ellzey
On Tue, Aug 16, 2011 at 09:47:07AM -0500, Mark Ellzey wrote: > On Tue, Aug 16, 2011 at 12:28:21PM +0300, about bus wrote: > > No, I don't, because they output very huge, and I don't know what exactly I > > should looking there. > > I think I have missed asking some basic questions. > > - What ve

[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: "(60: Operation timed o

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

2011-08-16 Thread Mark Ellzey
On Mon, Aug 15, 2011 at 01:53:18PM +0300, about bus wrote: > Http server use only libevent http functions for network communication. > > evthread_use_pthreads; So the webserver is threaded? > event_base_new > evhttp_new > evhttp_set_gencb > evhttp_bind_socket > while (1) { >event_base_loop >

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

2011-08-16 Thread Mark Ellzey
On Tue, Aug 16, 2011 at 12:28:21PM +0300, about bus wrote: > No, I don't, because they output very huge, and I don't know what exactly I > should looking there. I think I have missed asking some basic questions. - What version of libevent are you using? - What operating system and event backend

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_cb > > functions calls. > > > > 20

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

2011-08-15 Thread Mark Ellzey
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_cb > functions calls. > > 2011.08.14 16:52:27 [warn] === evhttp_socket_cb: fd: 131 > 2011.08.1

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 http server? I think it can cre

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

2011-08-15 Thread Leonid Evdokimov
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 http server? I think it can create such delay in case of some nasty bug. -- WBRBW, Leonid Evdokimov

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 - [warn] > > messages from my http server

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] Re: libevent http and lost requests

2011-08-12 Thread Mark Ellzey
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,

[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%