Suddenly stopped working - Error 502 Bad Gateway

check /var/log/daemon.log, do you see an error about not being upgraded to 3.4 before going to 3.6?

If so, I had the same problem and this is how I fixed it: