CDN causes white screen

White screen often happens to my site with CDN. And clearing CDN cache manually can solve the problem. Does anybody run into the same problem?

The errors in browser Console is like ‘unexpected token’ or something like that. I just recovered from the problem by clearing cache and regrettably didn’t take a screenshot.

Are you behind Cloudflare? If so, do you have it Rocket Loader or additional minimization enabled? These regularly cause issues and we recommend you disable them.

No. But it is behind Nginx. Will this affect?

If you’re just behind an Nginx instance with a configuration like this, this shouldn’t cause these kinds of issues.

We need more details to help you. If this happens again, can you capture details of the error? What URL is your Discourse instance available at? What exactly do you mean by “clearing CDN cache” – can you describe what you’re doing, exactly?

My Nginx configuration is basically the same as that.
I’ll try to capture details as much as possible if this happens again. Thanks for your generous help.

Unfortunately, the problem occurs again.

These are the errors in Chrome console.

And in Safari:

My Discourse instance is https://base.admirable.one

Here is what I found: the Content-Encoding of Javascript file handled by CDN is gzip. I guess it should be br to function properly? So I think maybe the problem is related to my CDN’s cache.

What CDN are you behind?

I use Qiniu as my CDN service provider. I’ll try if delete and recreate the project in their panel can solve.

Look for settings in their control panel that affect Discourse’s files, like minimization options, and disable them.

위와 동일한 작업을 수행하고 캐시도 삭제했지만 여전히 흰 화면만 표시됩니다. CloudFront를 사용할 때는 문제가 발생하지 않지만, Hostry나 BunnyCDN을 사용하면 화면이 계속 흰색으로 남아 있습니다.