Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm behind a proxy that is "Enterprise DDoS Protected". On a normal day with normal connections to all my servers the concurrent connections on the proxy is 17,000. Yes 17,000 is normal for the nature of my sites. 90% of the traffic is requesting bytes of data then that's it, no need to connect again for a minute. The problem with the "Enterprise DDoS Protected" proxy they are telling me if I would reduce my concurrent connections It will stop hanging up or have faster latency times. They have tuned it on there end but my servers seem to keep the connections open to long.

I'm running on my servers

Ubuntu Linux 11.10
Linux 3.0.0-17-server on x86_64
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz, 8 cores

on all my servers. My questions is how can I reduce the concurrent connections to where after it connects it closes the connection out like after 10 seconds on my servers?

share|improve this question
What software is running on the server? If you need a timeout, it should be implemented there. – Shane Madden Jul 15 '12 at 20:04
Ubuntu Linux 11.10 – Tabatha M Jul 15 '12 at 20:05
I mean, what application software are the users connecting to? I'm not talking about the OS, I'm talking about the service you're providing. – Shane Madden Jul 15 '12 at 20:06
HTTP port 80 apache2 – Tabatha M Jul 15 '12 at 20:06
Ok - what is the HTTP server software that you're using? – Shane Madden Jul 15 '12 at 20:07
up vote 3 down vote accepted

To force an HTTP keep-alive connection to close after a certain time in Apache, use the KeepAliveTimeout directive.

KeepAliveTimeout 5

Set this based on the expected time that the client needs to complete a set of requests to load a resource - you want to let the connection stay alive long enough for that to occur, then have the server close it when it's no longer needed. 5 seconds should be enough in most cases.

share|improve this answer
Also on the MaxKeepAliveRequests I had it set to 2. Now since I'm behind a protected proxy and the servers only see one IP should I set that to 0? – Tabatha M Jul 15 '12 at 20:27
0 makes it unlimited, but it'll still be limited by the timer - so either way is fine. – Shane Madden Jul 15 '12 at 20:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.