title: Find (and kill) process locking port 3000 on Mac
body: <p>How do I find (and kill) processes that listen to/use my TCP ports? I'm on macOS.</p>
  <p>Sometimes, after a crash or some bug, my Rails app is locking port 3000. I can't find it using <code>ps -ef</code>...</p>
  <p>When running</p>
  <pre><code>rails server
  </code></pre>
  <p>I get</p>
  <pre><code>Address already in use - bind(2) (Errno::EADDRINUSE)
  </code></pre>
  <p>The same issue happens when stopping Node.js process. Even after the process is stopped and the app stops running, port <code>3000</code> is locked. When starting the app again, getting</p>
  <pre><code>Address already in use (Errno::EADDRINUSE)
  </code></pre>