title: Rails spends 2~3 seconds before processing request. How to resolve it?
body: <p>I have a Rails app, and it seems that every request cost it 2~3 seconds before processed.</p>
  <p>e.g. when I start a GET request, which real time is x ms.  However it takes me 3 seconds in total, I found that in the log file, Rails would stop 2~3 seconds between <code>Started GET...</code> and <code>Processing by...</code> :</p>
  <pre><code>Started GET &quot;/api/users/me&quot; for 127.0.0.1 at 2022-05-29 16:14:15 +0900
  
  [ 2~3 seconds waiting....]
  
  Processing by Api::V1::UsersController#me as */*
    Mother::User Load (3.0ms)  SELECT &quot;users&quot;.* FROM &quot;users&quot; WHERE &quot;users&quot;.&quot;id&quot; = $1 LIMIT $2  [[&quot;id&quot;, 1647], [&quot;LIMIT&quot;, 1]]
    ↳ app/controllers/application_controller.rb:75:in `get_current_operator'
  Completed 200 OK in 8ms (Views: 0.2ms | Allocations: 667)
  </code></pre>
  <p>my environment:</p>
  <ul>
  <li>Rails 6 , development mode   ( run in docker )</li>
  <li>Windows 10, docker desktop 4.8.1 , WSL 2</li>
  <li>database: postgres 10.14  ( run in docker )</li>
  <li>Rails route:  400+</li>
  <li>hardware: CPU 16core 32thread, 128G memo.   CPU usage: 1%~5%, mem usage: &lt;= 50G</li>
  </ul>
  <p>I have written Rails for 10+ years, so, any ideas? thanks !</p>