Gitlab down all of a sudden

So we have a self hosted gitlab instance, it was working all fine and suddenly when it throwed a 500 error and was not responding.
We did not do anything and it just happened in a flash.

After sometime it showed 502 error.

As a temporary fix we restarted the vm on which the gitlab instance is being hosted.
Now it is working fine.

But i wanted to know the root cause for this to happen.
Like why did i get the 500 error in the first place.



First check your logs file under /var/log/gitlab - maybe you can find hints in there. Also, what version of Gitlab are you running and is it accessible from the internet? A lot of problems with older versions and them stopping responding were due to being compromised because of an RCE and running CPU cryptominers. Whether that is the case of not with yours is hard to tell without knowing what version of Gitlab or whether accessible from the internet.

Here is a post where they had that crypto problem: Error : 502 Gitlab is taking too much time to respond - #4 by iwalker

the gitlab version 14.5.2 and we checked the logsā€¦ looks like the cpu % reached 100.
Then again i am not sure which files to move because i havent installed any files or applications in the vm apart from the gitlab.

Also all the files present are dependencies which got installed automatically when we installed gitlab.

Is there any option i can try?

Yes, look at the post I linked, and read that. Also look at the posts that are linked already in my post which have tons of info on how to find out if your machine has been compromised or not.