Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.59k stars 432 forks source link

npm ENOMEM error during build #815

Closed olalonde closed 9 years ago

olalonde commented 9 years ago

I'm getting an Error: spawn ENOMEM error during npm install of strider v1.6.6 on a 1 GB General Purpose v1 Rackspace server. I'm attempting to install Strider using Dokku which uses Docker and don't have any other processes running on the machine. Is this normal? Does Strider require more than 1 GB memory?

       71373 silly install write writing browserify-zlib 0.1.4 to /tmp/build/node_modules/browserify/node_modules/browserify-zlib
       71374 silly install write writing JSONStream 0.8.4 to /tmp/build/node_modules/browserify/node_modules/JSONStream
       71375 silly gunzTarPerm extractEntry lib/win32/base64.h
       71376 silly gunzTarPerm extractEntry lib/win32/kerberos.cc
       71377 silly gunzTarPerm extractEntry lib/win32/kerberos.h
       71378 verbose unsafe-perm in lifecycle true
       71379 verbose stack Error: spawn ENOMEM
       71379 verbose stack     at exports._errnoException (util.js:746:11)
       71379 verbose stack     at ChildProcess.spawn (child_process.js:1162:11)
       71379 verbose stack     at exports.spawn (child_process.js:995:9)
       71379 verbose stack     at spawn (/tmp/build/vendor/node/lib/node_modules/npm/lib/utils/spawn.js:7:13)
       71379 verbose stack     at runCmd_ (/tmp/build/vendor/node/lib/node_modules/npm/lib/utils/lifecycle.js:207:14)
       71379 verbose stack     at runCmd (/tmp/build/vendor/node/lib/node_modules/npm/lib/utils/lifecycle.js:172:5)
       71379 verbose stack     at runPackageLifecycle (/tmp/build/vendor/node/lib/node_modules/npm/lib/utils/lifecycle.js:134:3)
       71379 verbose stack     at Array.<anonymous> (/tmp/build/vendor/node/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
       71379 verbose stack     at LOOP (/tmp/build/vendor/node/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
       71379 verbose stack     at chain (/tmp/build/vendor/node/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
       71380 verbose cwd /tmp/build
       71381 error Linux 3.13.0-53-generic
       71382 error argv "/tmp/build/vendor/node/bin/node" "/tmp/build/vendor/node/bin/npm" "install" "--userconfig" "/tmp/build/.npmrc" "--production"
       71383 error node v0.12.5
       71384 error npm  v2.11.2
       71385 error code ENOMEM
       71386 error errno ENOMEM
       71387 error syscall spawn
       71388 error spawn ENOMEM
       71389 error If you need help, you may report this error at:
       71389 error     <https://github.com/npm/npm/issues>
       71390 verbose exit [ 1, true ]
To dokku@localhost:strider
 ! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@localhost:strider'
oliversalzburg commented 9 years ago

Strider probably doesn't require more than 1 GB of memory, the build process however seems to do so.

We use a 4 GB machine for our build server. But our builds also require quite a bit of memory.

fernandoneto commented 9 years ago

my machine have 1 GB of memory and i don't have any problems installing.

olalonde commented 9 years ago

Fixed by using 2GB machine.

knownasilya commented 9 years ago

If you use master, you can install with npm install --production and skip the dev dependencies and the build step.

marcelovue commented 6 years ago

I seeing here that the isufficient RAM could be the issue, so I closed somes applications(softwares) and tabs from my browser I wasn't using and the problem below was solved ENOMEM: not enough memory, read..
and so I type my custom command in webpack npm run build-dev. I know that is a old problem, but I come here and I did know the solution
I have 3GB of RAM in total, and arround 1GB free.