Running rails 5.0.x, Ruby 2.6.3. And I am having performance problems very specifically when using Unicorn or Puma. Upgrading Rails is going to be quite some work but that's going to be the next thing I'd try.
Basically I look at my logs, the rails server responds in about 250ms, pretty consistently.
However when looking from the browser's side, the request takes 1.5-3 seconds. I cannot figure out a way to account for the time disparity.
What makes it extra weird is when I switched from unicorn or puma to webrick the browser's timing is only marginally slower than the time reported by rails, so within 10 or so milliseconds to what rails reported.
I run Puma / Unicorn with 1 thread, 1 process to make an even comparison.
Any suggestions as to what investigation avenues to take would be incredibly helpful.
Edit: Was previously running Ruby 2.4.6
Also tried putting in a default rails app with the same versions, that one works fine without the weird slowdown.
Edit 2: Even started cutting out behaviors and upgrading to latest rails. No help. There's definitely something going on in the configuration / gems, but how to get to an answer?
Edit 3: I use ActiveAdmin. I am suspecting this may be the cause, but need to find a way to prove it.