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

Re: [Libevent-users] Stop listening on http server when accept() returns Too Many Open Files



Does anyone have an answer to that? We just hit this problem in real
life. It's not just theory.

Thanks,
Simon

On 2010-09-03 03:49, Yee Keat Phuah wrote:
> Hi,
> 
> I am using the http server part of libevent 2.0.6, and currently testing
> it under all sorts of situation. One of the situation I ran into is when
> there are too many connections, there might be "Too Many Open Files"
> returned from the accept() call, that is ok, but the problem is because
> in listener.c:listener_read_cb() function, there's no way I could
> intercept this error message, and maybe stop accepting new connections,
> what happen subsequently is that event_sock_warn just gets called
> thousands of time.
> 
> Is there a way that I can intercept this error and act accordingly?
> Probably stop listening for a while?
> 
> Thanks in advance.
> 
> Cheers,
> Phuah Yee Keat


-- 
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server        --> http://numb.viagenie.ca
vCard 4.0               --> http://www.vcarddav.org
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.