andxblink
By:
andxblink

Why does my Discourse crash (502 Bad Gateway) after "./launcher rebuild app"?

October 15, 2016 512 views
Applications Docker Getting Started Linux Commands One-Click Install Apps Nginx Ubuntu

My vanilla install of Discourse as One-Click Install App now crashed three times. Why?

The first two times I thought this might my mistake and that ./launcher rebuild app may not be allowed in this One-Click Install App. Those first two were for corrections to app.yml that I wanted to save.

But the third was after updating from inside Discourse, so a necessary final step.


My question put another way: How can I successfully edit app.yml and should I do updates from inside Discourse?

1 Answer

Our one-click uses a very standard installation of Discourse using docker and should be rebuildable using standard methods. If the app has been crashing, the first thing I would check is whether you are running out of memory on the droplet causing services to crash.

As part of the one-click setup process we build a new app.yml and use the following process to fully reconfigure (this is done by the script that is run when you first log in)

cd /var/discourse;
./launcher destroy app;
rm -f  /var/discourse/shared/standalone/redis_data/redis.rdb;
rm -Rf /var/discourse/shared/standalone/nginx;
rm -Rf /var/discourse/shared/standalone/html;
export UNICORN_SIDEKIQS=1;
./launcher start app;
Have another answer? Share your knowledge.