Started GET "/" for 219.144.218.209 at 2025-03-17 18:22:55 +0000
Processing by ListController#latest as HTML
Rendered layout layouts/application.html.erb (Duration: 1932.6ms | GC: 10.6ms)
Completed 200 OK in 2521ms (Views: 1933.4ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 14.9ms)
My server has 2 CPU cores and 8GB of RAM.
The log shows layouts/application.html.erb rendered so slow.
I removed some content in layouts/application.html.erb and it take up to 300-500ms to respond.
I’m having a similar problem.
I think the docker might be doing some kind of magic indexing on internal databases only, which isn’t great as that severely limits how we can scale.
Hmmm … that doesn’t sound right to me. The same migrations should be being applied regardless of where the database is … and that includes the addition of indexes.
It would be good to demonstrate the difference if you can get a query plan on both instances for the same query that is taking much longer on the external instance.
(appreciate that might be a pain for you to gather)
If the query plan is identical, then it surely must be latency or performance of the external database that is at fault?