title: Error "mysqli::real_connect(): (HY000/2002): Only ... permitted."
body: <p><strong>The ERROR:</strong> </p>
  
  <blockquote>
    <p>mysqli_real_connect(): (HY000/2002): Only one usage of each socket
    address (protocol/network address/port) is normally permitted.</p>
  </blockquote>
  
  <p>However, it appears I have <strong>enough ports</strong>.</p>
  
  <p><strong>DETAILS:</strong> </p>
  
  <p>I have a <code>MySQL</code> server that has been running for several months without issue.  I am running <strong>Windows 10, PHP 7.0 and MySQL 5.7</strong>.  This is a busy server with a high volume of transactions per hour.  </p>
  
  <p>For about a week now, I have been getting an excessive volume of:</p>
  
  <blockquote>
    <p>mysqli_real_connect(): (HY000/2002): Only one usage of each socket
    address (protocol/network address/port) is normally permitted.</p>
  </blockquote>
  
  <p>I have tried the common suggestions, which have worked for me on other machines.</p>
  
  <pre><code>TcpTimedWaitDelay = 30 and MaxUserPort = 65534
  </code></pre>
  
  <p>I also <strong>added</strong>: </p>
  
  <pre><code>TcpNumConnections = 16777214 and TcpMaxDataRetransmissions = 5.
  </code></pre>
  
  <p>I am able to confirm the max ports and timeout via netsh. Further, when I run netstat /abno I consistently see fewer than 1000 ports in use. However, I am still getting the above error. So it appears that the machine is not even using all of the ports.</p>
  
  <p>In my <code>.ini</code>, I have a <code>connection limit of 10,000</code>.</p>