Generally its the upper 32k ports that are ephemeral, and if your churn more than that per minute in connections, you&#x27;ll run into that TIME_WAIT issue.<p>Hacky way to get around that is to enable tcp_tw_reuse which will let you reuse ports, but it can be risky if you get a SYN from the previous connection that happens to lineup with segment number of the current connection (which will close your connection). Shouldn&#x27;t happen often, and if you can tolerate a small amount of failure is an easy way to get around this limit.<p>[0] <a href="http:&#x2F;&#x2F;blog.davidvassallo.me&#x2F;2010&#x2F;07&#x2F;13&#x2F;time_wait-and-port-reuse&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blog.davidvassallo.me&#x2F;2010&#x2F;07&#x2F;13&#x2F;time_wait-and-port-r...</a>