Gracefully handle EMFILE
Implementing a tip from Marc Lehmann: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#The_special_problem_of_accept_ing_wh Keep an extra FD around for every server. When you hit EMFILE, destroy that FD, accept a connection, close it; in this way you can clear the connection queue and let people know that you're overload. No more timeout needed.
parent
79ecc8e9
Please register or sign in to comment