title: osx docker max connections limit
body: <p>I installed Docker-ce(ver 17.03.1-ce-mac12 17661) on macOS Sierra(ver 10.12.5)</p>
  
  <p>I created a container and run a simple socket echo server.
  And then attempted to connect to the container's echo server from the host.</p>
  
  <p>Initially, when the number of open sockets reached 370, a connection failure occurred,
  I found the following via Google search.</p>
  
  <p><a href="https://github.com/docker/for-mac/issues/1009" rel="nofollow noreferrer">https://github.com/docker/for-mac/issues/1009</a></p>
  
  <p>To summarize, the docker for mac has its own maximum number of connections.
  I modified the maximum number of connections moderately according to this content.</p>
  
  <p>And I connected to the docker host in the following way.</p>
  
  <p><a href="http://pnasrat.github.io/2016/04/27/inside-docker-for-os-x-ii" rel="nofollow noreferrer">http://pnasrat.github.io/2016/04/27/inside-docker-for-os-x-ii</a></p>
  
  <p>I changed the ulimit configuration of the docker host as well, and changed the osx and container settings accordingly.</p>
  
  <p>And again, I tried again, but this time the number of sockets exceeded the 370 limit mentioned above, but it is also blocked at about 930 ~ 940.</p>
  
  <p>I try to change the settings like this, but it does not get better.</p>
  
  <p>Note that a docker running on top of an Ubuntu server does not need to change any settings, and works well without any socket restrictions.</p>
  
  <p>An echo server running inside the container of a docker running on Ubuntu can maintain at least 4000 sockets.</p>
  
  <p>The problem only occurs with the docker for mac.</p>
  
  <p>If you are aware of this situation, can anyone suggest a solution?
  Thank you.</p>