I have a ubuntu EC2 with its default settings. I'm using it for a web application that receives request from iPhone apps. I was trying to do a stress test to see how many connections could be handled by the server. I increased the ServerLimit in apache to 2500 requests and so the MaxClients. I did ulimit -n 4096 and also modified limit.conf to add:
soft nofile 4096 hard nofile 4096
I did not change anything in iptables. When run my test with about 3000 consecutive https requests, the loop I use to send the requests stops in about 60 seconds with about 1000 requests being served. I repeated this many times, similar results.
What could be causing to drop the connections after 60 secons or 1000 requests? Do I need to change anything else to allow more connections to the server?