title: How can I serve requests concurrently with Rails 4?
body: <p>I'm trying to serve multiple requests concurrently in Rails 4, something I was able to do very easily with <code>config.threadsafe!</code> and <code>Puma</code> in Rails 3.</p>
  
  <p>Say I have this controller</p>
  
  <pre><code>class ConcurrentController &lt; ApplicationController
    def index
      sleep 10000
    end
  
    def show
    end
  end
  </code></pre>
  
  <p>I used to be able to just start puma with <code>puma -t 2:16 -p 3000</code> (for min 2 threads) and hit <code>index</code> and then <code>show</code> and still have <code>show</code> render properly.</p>
  
  <p>In Rails 4, if I attempt to do the same thing Puma now locks on the <code>index</code> request and <code>show</code> never gets rendered. When I hit <code>Ctrl-C</code> for the server Puma gives me this error:</p>
  
  <pre><code>Rack app error: #&lt;ThreadError: Attempt to unlock a mutex which is locked by another thread&gt;
  </code></pre>
  
  <p>What am I missing here to get concurrency to work with Rails 4? <code>config.threadsafe!</code> is supposed to not be needed (and doesn't make a difference even if I try)</p>