GitLab wants to be updated on a regular basis. Most of the time, this update is painless. It happens sometimes that the update / upgrade does not work expected and the user is greeted with a
502 error:

Such an error can often be removed by reconfiguring the GitLab instance. Stop the GitLab server first
sudo gitlab-ctl stop
Perform the automatic reconfiguration:
sudo gitlab-ctl reconfigure
Start the GitLab server:
sudo gitlab-ctl start