Coder Social home page Coder Social logo

Comments (21)

DoubleMalt avatar DoubleMalt commented on July 19, 2024 5

You need more RAM is not a great answer for many cases. How is the unzipping done? Can we use less RAM to do it?

from node-geoip.

kuldipem avatar kuldipem commented on July 19, 2024 5

You can add/modify swap size to solve this problem. you can read here how to add swap file https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04,

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024 4

You need more ram. See all the closed issues about digital ocean for more
details.

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024 2

yes, get more RAM. That is the only fix for this issue.

from node-geoip.

mbbender avatar mbbender commented on July 19, 2024 1

Thanks @kuldipem for that info. Much better solution in my case than getting more physical ram.

from node-geoip.

cezary avatar cezary commented on July 19, 2024 1

@kuldipem fixed the issue for me as well, thanks!

from node-geoip.

richardvanbergen avatar richardvanbergen commented on July 19, 2024 1

Thanks @kuldipem. For anyone else, you might already have a swap file (I did on Digital Ocean). The problem was that it was full, all I had to do was restart the server and it works fine.

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024 1

@saad3074 yup, get more RAM.

from node-geoip.

jonrahoi avatar jonrahoi commented on July 19, 2024

thanks - should have searched first #n00b

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

The problem is not with the unzipping, the problem is that we need RAM to store the complete data structure in memory at all times in order for geoip to do fast lookups. If we do not store this in memory, then lookups become slower because we'll keep going to disk to read the file.

from node-geoip.

jsgv avatar jsgv commented on July 19, 2024

Having the same problem trying to install on Vagrant. Any fixes?

from node-geoip.

echiu64 avatar echiu64 commented on July 19, 2024

Alternative is to run the update on a bigger machine and then push the data files to all the servers needing the update.

from node-geoip.

karonlewin avatar karonlewin commented on July 19, 2024

I got more RAM and everything gone fine. Thank you!

from node-geoip.

rajimali avatar rajimali commented on July 19, 2024

npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--global" "npm"
npm ERR! node v0.12.6
npm ERR! npm v2.11.1
npm ERR! path /usr/bin/npm
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, unlink '/usr/bin/npm'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, unlink '/usr/bin/npm'] errno: -13, code: 'EACCES', path: '/usr/bin/npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, unlink '/usr/bin/npm'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, unlink '/usr/bin/npm'] errno: -13, code: 'EACCES', path: '/usr/bin/npm' }

npm ERR! Please include the following file with any support request:
npm ERR! /home/ali/npm-debug.log

how to solve this problem

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

@rajimali, read the instructions in the error message. It tells you how to fix the problem.

from node-geoip.

Gerst20051 avatar Gerst20051 commented on July 19, 2024

as a last resort you can remove some packages and slowly add back the packages that need to install. the less packages that need to be installed the less memory that is consumed.

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

@Gerst20051 this has nothing to do with other packages. The node-geoip package just uses a lot of memory to store the location map since it's a big map. Since this was being done on install, it also prevented installation.

from node-geoip.

Gerst20051 avatar Gerst20051 commented on July 19, 2024

@bluesmoon oh wow i didn't realize one package would also cause it to run out of memory!

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

If you have only 512MB of RAM, pretty much anything will cause you to run out of memory.

from node-geoip.

saad3074 avatar saad3074 commented on July 19, 2024

i have 512MB Ram and this error show while npm start or npm run server

0 info it worked if it ends with ok
1 verbose cli [ '/root/.nvm/versions/node/v7.2.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v7.2.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'server' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserver', 'server', 'postserver' ]
5 info lifecycle [email protected]preserver: [email protected]
6 silly lifecycle [email protected]
preserver: no script for preserver, continuing
7 info lifecycle [email protected]server: [email protected]
8 verbose lifecycle [email protected]
server: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]server: PATH: /root/.nvm/versions/node/v7.2.0/lib/node_modules/npm/bin/node-gyp-bin:/root/friendealer/node_modules/.bin:/root/.nvm/versions/node/v7.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle [email protected]
server: CWD: /root/friendealer
11 silly lifecycle [email protected]server: Args: [ '-c',
11 silly lifecycle 'webpack-dev-server --content-base public/ --config="webpack.config.dev.js" --inline --port 4202 --host 0.0.0.0' ]
12 silly lifecycle [email protected]
server: Returned: code: 137 signal: null
13 info lifecycle [email protected]~server: Failed to exec server script
14 verbose stack Error: [email protected] server: webpack-dev-server --content-base public/ --config="webpack.config.dev.js" --inline --port 4202 --host 0.0.0.0
14 verbose stack Exit status 137
14 verbose stack at EventEmitter. (/root/.nvm/versions/node/v7.2.0/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/root/.nvm/versions/node/v7.2.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:885:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /root/friendealer
17 verbose Linux 4.4.0-79-generic
18 verbose argv "/root/.nvm/versions/node/v7.2.0/bin/node" "/root/.nvm/versions/node/v7.2.0/bin/npm" "run" "server"
19 verbose node v7.2.0
20 verbose npm v5.0.3
21 error code ELIFECYCLE
22 error errno 137
23 error [email protected] server: `webpack-dev-server --content-base public/ --config="webpack.config.dev.js" --inline --port 4202 --host 0.0.0.0
23 error Exit status 137
24 error Failed at the [email protected] server script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 137, true ]

from node-geoip.

jespertheend avatar jespertheend commented on July 19, 2024

Is this still an issue? I was able to install on digitalocean just fine. Digitalocean droplets come with 1GB ram nowadays, but htop shows my node application is only using 132M.

from node-geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.