Gitlab on a minimal requirement Server
2G won't cut it. Gitlab is a notorious memory hog.
From the docs: https://docs.gitlab.com/ee/install/requirements.html
4GB RAM is the required minimum memory size
Official doc states flat out "Gitlab has memory leaks" (https://docs.gitlab.com/ee/administration/operations/unicorn.html#unicorn-worker-killer)
More details:
https://about.gitlab.com/handbook/engineering/development/enablement/memory/
https://news.ycombinator.com/item?id=17379523