Discourseフォーラムがフリーズしてタイムアウトし、読み込めない

最近、Discourseフォーラムの大部分のリクエストでタイムアウトが発生するようになりました:https://caddy.community

問題が発生し始めた数日前には、アップデートや変更は一切行われていません。時には正常に読み込まれることもありますが、数分後には読み込みに数分を要するようになります(上記のリンクが速く読み込まれた場合でも、数分後に再度お試しください。curl を使用することもできます)。

ホスティングは DigitalOcean 上で行われています。

マシンリソースは逼迫していません:CPU、RAM、ディスク、ネットワーク I/O には十分な余裕があります。

ログにエラーはなく、マシン上で未知のプロセスも実行されていません。約3年間正常に稼働していましたが、現在では読み込めません。

フォーラムをより高速に動作させる方法をご存知の方はいらっしゃいますか?マシンを再起動しましたが、フォーラムは依然として低速のままです。

「いいね!」 2

Hey @mholt :wave:,

I did try going back and forth between /latest and /categories and it’s pretty fast.

Are you seeing slowdown in specific routes of the app?

Also, do you have the MiniProfiler enabled?

Please follow this to enable it:Long loading times for user summary page with slow database

After enabling it, when you hit a slow down you will know exactly where it is.

「いいね!」 7

Huh… dang, it is loading faster today. :thinking: (Others in our community have also experienced it, I know it’s not just me, haha – but it can be intermittent, it seems.)

I’ll try that out when I have a chance, thanks!

「いいね!」 5

Hmm, it seems my ssh connections also time out sometimes.

I wonder if DigitalOcean is having network issues (they haven’t reported anything, though) – maybe I will have to open a ticket with DO to find out. It might not be specific to Discourse.

「いいね!」 2

This has started happening again recently: takes several minutes for the forum to load.

Ping times to the DigitalOcean droplet are nominal: ~80ms. Server load is also nominal:

The timings in the debug thing in the corner (MiniProfiler) don’t reveal any problems: all times are within ~300ms:

(This page took about 3 minutes to load.)

Is there any part of the loading process between reaching the server and rendering the page that are not counted by the MiniProfiler?

「いいね!」 2

Time spent on Redis isn’t counted and can cause what you see. You will have to dig into the server and check if Redis is having trouble to persist changes to disk.

「いいね!」 2

Interesting, any tips on how to do that? Or link to a relevant guide? This is outside my pay grade :sweat_smile:

「いいね!」 2

Oh let me correct myself a bit here. The time spent on redis won’t be on the broken down part of mini profiler, but be counted in the overall time in the first column. So looking at your screenshot, this doesn’t appear to be the case.

Does Caddy logs time waiting on the backend and overall time spent on each request? Is there a possibility that the reverse proxy was waiting?

「いいね!」 3

I will add this to the logs and try to find out next time it happens.

「いいね!」 1

This could be time it is taking it to grab static assets ? Maybe have a look in chrome dev tools next time this happens?

「いいね!」 1

Thanks for the idea Sam. I have looked at the network inspector before and I do not believe I remember anything too telling – but I’ll check it in more detail next time.

This tends to happen every few days or so, I’ll report back when it does!

「いいね!」 1