502 Bad Gateway after Update

Try running

cd /var/discourse 
./discourse-doctor 

That will save the logs so you can share that. The information you have shared gives us little to go on.