Hello, after clicking login, it takes 20 seconds to load before you can enter my page. why?

After logging in: homepage/post page loading takes 20-40 seconds
Not logged in: Normal speed access

hi @s_xu welcome to Discourse Meta support forum.

Can you please provide as much detail as possible about your install and situation? For example:

  • Is your Discourse version up to date?
  • Is it a standard install
  • Are you self-hosting or hosted?
  • Are there any errors in the dev console when your site is loading?
  • Have you installed any plugins or theme components recently?
  • Is this only when you first log in - that is, do the pages load normally once you are logged in?
  • what do the /logs/ show?

(post deleted by author)

Hello, it’s not the latest version. Every time I log in using Docker installation, the page will load normally after logging in,

Hello, it’s not the latest version. Every time I log in using Docker installation, the page will load normally after logging in,

update it from the command line

hello, This is our production environment, and updating may cause other issues. Are there any other solutions? We may need to identify the problem first. Currently, we are looking at whether it is caused by some SQL in the database or the lack of indexes

have you changed anything with the database recently?
need more info.

if possible, check the rails logs when you log in:

cd /var/discourse
./launcher enter app
tail -f log/production.log

Are you hitting swap?

What is the state of your memory like?

At the very least I would reboot your server to see if things improve.

You might also want to check how many unicorns (web workers) you have configured (it might be insufficient).

I would perhaps consider hiring an expert Discourse SA in Marketplace

1 Like

no,Check the logs, is there a problem with the view rendering

Those logs do not relate to login and in any case don’t really tell us anything.

I don’t know what logs you need, this is the log filtered out using my username when I logged in

I can’t help with the solution, but I thought it would be good to have this part as text instead of an image so that if someone has a similar problem, they can find this topic using the search function:

  Rendered layout layouts/application.html.erb (Duration: 21134.1ms | GC: 0.8ms) 
Completed 200 OK in 21219ms (Views: 21134.7ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 3.0ms) 

Processing by TopicsController#show as HTML
Parameters: {“slug”=>“ensuring-remote-work-privacy-setting-up-vpn-for-location-concealment”, “topic_id”=>“41005”}
Rendered layout layouts/crawler.html.erb (Duration: 18.1ms | GC: 1.6ms)
Completed 200 OK in 79ms (Views: 18.6ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 5.8ms)
Started GET “/t/ar750s-adding-usb-wifi-adapter/10125.json” for 202.46.62.77 at 2026-01-26 09:24:44 +0000
Processing by TopicsController#show as JSON
Parameters: {“slug”=>“ar750s-adding-usb-wifi-adapter”, “topic_id”=>“10125”}
Completed 200 OK in 74ms (Views: 0.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 2.4ms)
Rendered layout layouts/application.html.erb (Duration: 21134.1ms | GC: 0.8ms)
Completed 200 OK in 21219ms (Views: 21134.7ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 3.0ms)
Started GET “/u/xu.shi/private-message-topic-tracking-state” for 103.220.218.7 at 2026-01-26 09:24:48 +0000
Processing by UsersController#private_message_topic_tracking_state as JSON
Parameters: {“username”=>“xu.shi”}
Completed 200 OK in 15ms (Views: 0.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started GET “/t/flint-2-wireless-speed-are-1-4-in-reality-than-advertised/48251?page=2” for 23.98.142.176 at 2026-01-26 09:24:49 +0000
Processing by TopicsController#show as HTML
Parameters: {“page”=>“2”, “slug”=>“flint-2-wireless-speed-are-1-4-in-reality-than-advertised”, “topic_id”=>“48251”}
Rendered layout layouts/crawler.html.erb (Duration: 21.1ms | GC: 0.0ms)
Completed 200 OK in 91ms (Views: 21.7ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started GET “/c/5/show.json” for 202.46.62.88 at 2026-01-26 09:24:51 +0000
Processing by CategoriesController#show as JSON
Parameters: {“id”=>“5”}