Stuck at "Compiling css for default"


(Manch Hon) #1

Hi

During the last two upgrades, one to 1.6.0beta5, another one to beta7, the upgrade process was stuck at the step “compiling css for default”. Docker manager says it’s still upgrading after 2 days of being stuck there.

Any idea why it’s happening, and how to get unstuck?

I am a newbie. Let me know if more information is needed for a diagnosis.

Thanks in advance!


(Jeff Atwood) #2

Probably out of memory or disk space. I suggest SSH’ing in and

./launcher stop app
./launcher cleanup
cd /var/discourse
git pull
./launcher rebuild app

(Manch Hon) #3

Both times Discourse reported it’s running the latest version after the upgrades, even though obviously some steps were never finished. So what steps come after css compilation?

My discourse site is only 2 weeks old and low activity. Only 40 fairly inactive users, and running on an 2-CPU 2GB ram and 40GB disk instance at Digital Ocean. It’s very far from filling the disk. So maybe it ran out of ram? How much ram does it take to compile css?


(Jeff Atwood) #4

Don’t know, you would need to check some stats free -m and df -m.

You WILL need swap with the current version of Discourse, something about our build has changed and it requires even more memory than usual during rebuilds.

So add a swapfile, please, per the #howto. It’ll only be used rarely, and is more of an insurance policy than anything else. But a very very important insurance policy when you need it, e.g. without swap just one extra byte of memory allocated over the limit will cause a process to forcefully terminate, instead of slowing down a little and using “fake” memory from disk.


(Manch Hon) #5

Adding a swapfile works like a champ! It solves the css-compilation issue. Maybe you guys should add that step into the FAQ? I am also surprised Digital Ocean instances didn’t have that as a default…

Thanks! Keep up the good work.


(Alan Tan) #6

Hmm swap should have automagically been created for you as per

:thinking:


(Manch Hon) #7

I am adding swap at the host, not inside the docker instance. What’s the relationship between the two swap files anyway?


(Jeff Atwood) #8

Not on older installs it would not be. On newer ones, ones in the last month, perhaps.