On Thu, Dec 5, 2013 at 2:52 AM, Tomer Heber <to...@skyfence.com> wrote:

> Hi,
>
> Is your listener socket set to non-blocking? (I guess it's not).
>
> I suggest setting it to non-blocking. Just be prepared to handle error
> values returned such as: EAGAIN, EWOULDBLOCK etc...
>
> 10x,
> Tomer.
>



Nop it was ! and it is still non blocking..

i was calling listen(sock, 8), i will try with higher value.

Still think it is odd.




>
> -----Original Message-----
> From: owner-libevent-us...@freehaven.net [mailto:
> owner-libevent-us...@freehaven.net] On Behalf Of Yucong Sun
> Sent: Thursday, December 05, 2013 8:50 AM
> To: libevent-users
> Subject: Re: [Libevent-users] stuck in my accept call :-(
>
> I would take a blind guess and  maybe you need to adjust somaxconn
>
> http://www.freebsd.org/doc/handbook/configtuning-kernel-limits.html
>
> 12.14.1.2. kern.ipc.somaxconn
>
> The kern.ipc.somaxconn sysctl(8) variable limits the size of the listen
> queue for accepting new TCP connections. The default value of
> 128 is typically too low for robust handling of new connections on a
> heavily loaded web server. For such environments, it is recommended to
> increase this value to 1024 or higher. A service such as sendmail(8), or
> Apache may itself limit the listen queue size, but will often have a
> directive in its configuration file to adjust the queue size. Large listen
> queues do a better job of avoiding Denial of Service (DoS) attacks.
>
>
> On Wed, Dec 4, 2013 at 9:22 PM, sven falempin <sven.falem...@gmail.com>
> wrote:
> > hello:
> >
> > libevent-2.0.21-stable
> >
> > https://forums.freebsd.org/viewtopic.php?f=35&t=43654&p=242811#p242811
> >
> > event_assign(&serv_sock_evt, evt_base,
> >       sock, EV_READ | EV_PERSIST,
> >       server::serv_sock_accept_pattern, this);
> > event_add(&serv_sock_evt, NULL);
> >
> > then i do new in server::serv_sock_accept_pattern and path the
> > arguments to accept.
> >
> > But apparently socket has nothing to accept.
> >
> > It is not easy to produce....
> >
> > help/insight welcome.
> >
> > --
> > ----------------------------------------------------------------------
> > -----------------------------------------------
> > () ascii ribbon campaign - against html e-mail /\
> ***********************************************************************
> To unsubscribe, send an e-mail to majord...@freehaven.net with
> unsubscribe libevent-users    in the body.
>



-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\

Reply via email to