WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Bundler install memory error

Open ghost opened this issue 10 years ago • 9 comments

When i install gems via bundler i get an "Cannot allocate memory" error. Specific one this time is the following: /home/bee/.rvm/gems/ruby-2.2.4@gemset/gems/bundler-1.12.3/lib/bundler/source/git/git_proxy.rb:149:in``': Cannot allocate memory - git (Errno::ENOMEM) Expected result is obviously that the gems get installed.

My windows build number is 14393.51

To reproduce you need to install rvm following the guide from the website and then install bundler via gem install bundler. After that install some gems from gemfile via "bundle install"

I already see that there are some other issues with the "allocate memory" error but they dont work for me. Maybe somebody knows what to do

ghost avatar Aug 22 '16 19:08 ghost

Could you type free on a just opened bash window and post what it shows?

onomatopellan avatar Aug 23 '16 07:08 onomatopellan

What is the size of your Windows pagefile? I had to increase mine to 2.5 GB to stop getting the "Cannot allocate memory" errors.

JasonLinMS avatar Sep 02 '16 19:09 JasonLinMS

I'm having the same issue. Here is the output of the free command on a fresh bash window:

             total       used       free     shared    buffers     cached
Mem:       3884696    2704944    1179752      17720      34032     188576
-/+ buffers/cache:    2482336    1402360
Swap:      1441792      96304    1345488

Setting my pagefile to 2.5 GB, as suggested by @JasonLinMS, worked. Changing this parameter is a pain. Here's how I found it:

Control Panel > System and Security > System > Advanced System Settings > Advanced > Performance Settings ... > Advanced > Virtual Memory Change...

Then uncheck automatic paging file box and enter a custom min and starting size of 2500.

After rebooting my free command produces this output:

             total       used       free     shared    buffers     cached
Mem:       3884696    2677996    1206700      17720      34032     188576
-/+ buffers/cache:    2455388    1429308
Swap:      2560000      35424    2524576

bashcoder avatar Oct 02 '16 14:10 bashcoder

I'm currently receiving this issue with 2999MB allocated as my swap.

The free command results in:

             total       used       free     shared    buffers     cached
Mem:       8312940    6149696    2163244      17720      34032     188576
-/+ buffers/cache:    5927088    2385852
Swap:      3014656     182680    2831976

bryceroney avatar Oct 04 '16 04:10 bryceroney

Awesome also put a fixed page file and it works fine now 👍

nulian avatar Nov 19 '16 01:11 nulian

Marking this as a duplicate of #851 - see my comment about the incoming fix https://github.com/Microsoft/BashOnWindows/issues/851#issuecomment-264314420

benhillis avatar Dec 01 '16 22:12 benhillis

Any way to fix this?

aurimus avatar Mar 22 '17 09:03 aurimus

Hi @aurimus -- @benhillis claims that this is fixed in a recent Insider build.

aseering avatar Mar 22 '17 13:03 aseering

Confirm, after windows update it worked!

aurimus avatar Mar 23 '17 21:03 aurimus