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

Posted October 15, 2016 5k views
NginxUbuntuGetting StartedDockerDigitalOcean 1-Click Apps MarketplaceApplicationsLinux Commands

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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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;
./launcher start app;