Intermittent 404s for stylesheets on Heroku

(Stephen R Foster) #1

I just deployed Discourse to Heroku. When I refresh, the content renders without a stylesheet – sometimes. The output is identical to the issues reported in these threads:

I can reproduce the issue pretty consistently when I trigger a hard-refresh. However, after a few refreshes, the problem sometimes fixes itself.

When the content fails to load, the JavaScript console shows a 404 for:


I’m not doing anything fancy with my installation. In fact, I have another Discourse installation on Heroku that works just fine.

Also, I just updated to the latest version of Discourse on Github. Yet the problem persists. Any help would be appreciated.


Intermittent stylesheet errors on Heroku installation
(Jeff Atwood) #2

Is this a Docker install? We cannot support any other kind of install, sorry. Massive number of variables.

(Stephen R Foster) #3

It is a Heroku installation. Thanks anyway, though.

(Stephen R Foster) #4

I was able to make the problem go away by scaling the number of Heroku dynos down to 1. After digging through the code a bit, I’m guessing I was getting weird behavior due to the distributed cache and multiple processes.

I understand that Docker is the supported platform, but just for my own curiosity, can anyone tell me if Discourse is intended to only work with a single server process? Or is there a potential bug here?


(Jeff Atwood) #5

Hard to say, we focus on Docker to reduce the number of variables.

I will also note a Docker Discourse install at $10 per month on Digital Ocean is probably at least 5x to 10x cheaper than running Discourse on Heroku. Plus we could support it…

(Stephen R Foster) #6

Good to know. Thanks. The software is really incredible. I’ll definitely consider switching to Docker.