Comments (21)
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.
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.
You need more ram. See all the closed issues about digital ocean for more
details.
from node-geoip.
yes, get more RAM. That is the only fix for this issue.
from node-geoip.
Thanks @kuldipem for that info. Much better solution in my case than getting more physical ram.
from node-geoip.
@kuldipem fixed the issue for me as well, thanks!
from node-geoip.
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.
@saad3074 yup, get more RAM.
from node-geoip.
thanks - should have searched first #n00b
from node-geoip.
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.
Having the same problem trying to install on Vagrant. Any fixes?
from node-geoip.
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.
I got more RAM and everything gone fine. Thank you!
from node-geoip.
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.
@rajimali, read the instructions in the error message. It tells you how to fix the problem.
from node-geoip.
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.
@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.
@bluesmoon oh wow i didn't realize one package would also cause it to run out of memory!
from node-geoip.
If you have only 512MB of RAM, pretty much anything will cause you to run out of memory.
from node-geoip.
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]preserver: no script for preserver, continuing
6 silly lifecycle [email protected]
7 info lifecycle [email protected]server: [email protected]server: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
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/binserver: CWD: /root/friendealer
10 verbose lifecycle [email protected]
11 silly lifecycle [email protected]server: Args: [ '-c',server: Returned: code: 137 signal: null
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]
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.
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)
- URLs in updatedb.js no longer work
- ERR_BUFFER_OUT_OF_BOUNDS after automatic update HOT 2
- Re: Database updates HOT 16
- Custom directory in updatedb doesn't work. HOT 6
- Sometimes geoip return null value HOT 3
- returns wrong country for 72.18.74.123 HOT 1
- Update database HOT 1
- 401 Unauthorized when trying to upgrade HOT 8
- Upgrade is extremely slow. HOT 4
- Get the postal / zip code ? HOT 1
- The included data is out of date HOT 2
- remove fs dependency
- IP from US but the returned result is from Africa HOT 3
- Incorrect geolocation for non-geolocated IPs HOT 8
- IPv6 not working HOT 4
- Error in getting the Info HOT 2
- Seeking insight into the development process and buffer lookup approach used. HOT 2
- updatedb.js: ERROR: HTTP Request Failed [302 Found]
- Cannot use geoip-lite in next js application HOT 3
- Custom data directory not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-geoip.