What does error 24 mean? Also how does nginx handle the Slowloris tool?

gunblad3 nginx-forum at nginx.us
Mon Oct 12 17:35:14 MSD 2009

I'm looking to test out nginx with the Slowloris tool (http://ha.ckers.org/slowloris/), and I noticed that the following error appears a LOT in the error logs at one point:
accept() failed (24: Too many open files) while accepting new connection

This is what happens:
1) started nginx on a Debian machine, and the Slowloris tool on another using default parameters (1000 connections, 100 sec timeouts)
2) connections are established, and data is sent via these connections
3) shortly after, the error log throws up the error 24 (too many open files) and all the connections are closed
4) the tool continues to run, although every thread has to reinitiate the connection (actually, the "attack" has stopped at step 3)

This tool basically works by sending a GET request for a random URI per thread
GET /$rand HTTP/1.1
and then keeps sending a short header every $timeout seconds in order to force the HTTP request to stay unfinished.


a) what does error 24 mean in this case?  I'm not sure whether the file descriptors limit has really been hit, with the tool set to 1000 threads only..?

b) how do async web servers like nginx handle unfinished requests like these (as opposed to process based servers like Apache)?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,13111,13111#msg-13111

More information about the nginx mailing list