Skip to content

Instantly share code, notes, and snippets.

@marcusramberg
Created June 16, 2012 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusramberg/2942346 to your computer and use it in GitHub Desktop.
Save marcusramberg/2942346 to your computer and use it in GitHub Desktop.
Mac OS X has only 16K ports available that won't be released until socket
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds.
Consider reducing in case of available port bottleneck.
You can check whether this is a problem with netstat:
# sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
# sudo sysctl -w net.inet.tcp.msl=1000
net.inet.tcp.msl: 15000 -> 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment