Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so I've spooled up an Amazon EC2 server running Ubuntu, and then followed the instructions below to install GitLab;

The only step I've not been able to complete is running the following check on the status;

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

I get the following error;

rake aborted!
Errno::ENOMEM: Cannot allocate memory - whoami

Which I presume is becuase my EC2 is just running a free tier setup, so isn't that well spec'd.

Regardless, I've been trying to access this through my browser. I've set up the elastic IP and pointed my domain at it (for the purpose of this, lets say its Doing a whois on this domain shows me its pointing to the right place.

For some reason though, I get the "Oops, Chrome could not connect to". Now - for a period of time I was getting the Nginx holding page (telling me I still needed to perform configuration). This though disappeared after removing the default file from /etc/nginx/sites-enabled/ (after reading this could be issue on a troubleshooting page). Since then, I've had nothing, even when I symlinked the file back in from /sites-available. I've tried changing the owner of the file sat inside /sites-enabled and /sites-available to www-data, as suggested here, but I could only change the permission of the file in /sites-available, and not the symlinked one in /sites-enabled. The content of this file is as follows;

upstream gitlab {
  server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;

server {
  listen *:80 default_server;         # e.g., listen; In most cases *:80 is a good idea
  server_name;     # e.g., server_name;
  server_tokens off;     # don't show the version number, a security best practice
  root /home/git/gitlab/public;

  # Increase this if you want to upload large attachments
  # Or if you want to accept large git objects over http
  client_max_body_size 20m;

  # individual nginx logs for this gitlab vhost
  access_log  /var/log/nginx/gitlab_access.log;
  error_log   /var/log/nginx/gitlab_error.log;

  location / {
    # serve static files from defined root folder;.
    # @gitlab is a named location for the upstream fallback, see below
    try_files $uri $uri/index.html $uri.html @gitlab;

All the paths mentioned in here look ok...I'm about at the end of my knowledge now!

Update #1

After the suggestion of swapping some memory around, I have now managed to get..

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

...working. This though has brought up the following error with gitlab-shell.

gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the check)

This after some research I think comes back down to my domain not being correctly configured. I've removed the default symlink from sites-enabled (so there was no conflict with the default_server tag), and I've now altered the root path within file to point to a simple dir path containing an index file, and still I cannot get it to work through my browser. There's got to be something simply I'm missing?

share|improve this question

It looks like you missed something in the installation procedure because the check is returning an error that it doesn't have enough memory.

The GitLab Ubuntu requirements state:

512MB is the absolute minimum but we do not recommend this amount of memory, you'll need to configure a minimum swap of 256MB, you're memory will only allow you to run one slow unicorn worker, things will case only git ssh access to work because the git http access requires two running workers (one to receive the user request and one for the authorization check)

Since the amazon EC2 free tier instance only has ~600MB of memory you will need to configure swap. You can follow these instructions to configure swap space on your machine:

share|improve this answer
Thanks for the comment, I've updated my answer with a little more progress... – thebluefox Jun 13 '14 at 14:30
It looks like your issue is the same as this one now:… which seems to be solved by making sure that your domain points to in /etc/hosts – Maux Jun 13 '14 at 18:47

I ran into this same issue. Adding my Gitlab domain to /etc/hosts and pointing it to solved it for me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.