Out of memory on dev:setup inside Vagrant instance
I'm experiencing an out of memory error while executing
~/gitlab-development-kit/gitlab$ bundle exec rake dev:setup
I am using a clean Vagrant setup on a 8GB Windows 7 host. The default config for Vagrant assigns 2GB of memory that is insufficient for the seeding of the database. This is the error I get:
== Seed from /home/vagrant/gitlab-development-kit/gitlab/db/fixtures/development/13_comments.rb
.............................................................................................................................................................
...................................................................................................................................................................................
...................................................................................................................................................................................
...................................................................................................................................................................................
...................................................................................................................................................................................
...................................................................................................................................................................................
........................................................................................................................................................
OK
rake aborted!
Errno::ENOMEM: Cannot allocate memory - /home/vagrant/gitlab-development-kit/gitlab-shell/bin/gitlab-keys
/home/vagrant/gitlab-development-kit/gitlab/lib/gitlab/popen.rb:23:in `popen'
/home/vagrant/gitlab-development-kit/gitlab/lib/gitlab/utils.rb:10:in `system_silent'
/home/vagrant/gitlab-development-kit/gitlab/lib/gitlab/backend/shell.rb:187:in `remove_all_keys'
/home/vagrant/gitlab-development-kit/gitlab/lib/tasks/gitlab/shell.rake:110:in `setup'
/home/vagrant/gitlab-development-kit/gitlab/lib/tasks/gitlab/shell.rake:80:in `block (3 levels) in <top (required)>'
/home/vagrant/gitlab-development-kit/gitlab/lib/tasks/dev.rake:8:in `block (2 levels) in <top (required)>'
/home/vagrant/.rvm/gems/ruby-2.1.6/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-2.1.6/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => gitlab:shell:setup
(See full trace by running task with --trace)
vagrant@vagrant-ubuntu-trusty-64:~/gitlab-development-kit/gitlab$
If Vagrant is configured to run on 3GB the seeding process ends successfully. This is tested with
~/gitlab-development-kit/gitlab$ bundle exec rake db:drop
~/gitlab-development-kit/gitlab$ bundle exec rake db:create
~/gitlab-development-kit/gitlab$ bundle exec rake dev:setup
in the reconfigured vagrant instance