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

How do I know the maximum number of connections allowed to my Ubuntu server?

share|improve this question
up vote 4 down vote accepted

The maximum value is dynamic, depending on what system limitation you hit first. For example, maximum number of open files per process, multiplied by the number of processes that fit in ram+swap. That's just one possible limit.

share|improve this answer

From a network perspective there are 2^16 or 65535 socket ports, on which 2^16 or 65535 unique clients could connect. So that means if nothing else was a limitation (hah) that from a TCP only perspective you could have up to 2^32 or 4294836225 unique connections.

Good luck with that. :)

Your question perhaps hints more about how you deal with lots of TCP connections on a host.

This is classically called the C10k problem. (10,000+ connections used to be a good water mark for when things fall apart.)

Here's a doc explaining how you can help scale a box to many thousands of connections.

It's a little dated, but my experience is that most Linux apps use epoll to help mitigate.


share|improve this answer

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.