FATAL ERROR: Evacuation Allocation failed - proces

2020-06-07 08:01发布

问题:

whatever I run on my ubuntu server, I always get this error, does anyone know why ?

FATAL ERROR: Evacuation Allocation failed - process out of memory

$ node app.js
FATAL ERROR: Evacuation Allocation failed - process out of memory
Aborted (core dumped)

$ npm install
FATAL ERROR: Evacuation Allocation failed - process out of memory
Aborted (core dumped)

$ grunt -grunfile Gruntfile-online.js
FATAL ERROR: Malloced operator new Allocation failed - process out of memory
Aborted (core dumped)

EDIT1

$ free
             total       used       free     shared    buffers     cached
Mem:       4194304    2177148    2017156          0          0     936864
-/+ buffers/cache:    1240284    2954020
Swap:      3145728          4    3145724

$ df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/ploop36057p1  150G  7.6G  137G   6% /
none               2.0G  4.0K  2.0G   1% /dev
none               410M   64K  410M   1% /run
none               5.0M     0  5.0M   0% /run/lock
none               2.0G     0  2.0G   0% /run/shm

EDIT2

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  511 mongodb   20   0  879m  30m 7896 S  0.3  0.8  28:37.01 mongod
  689 youtrack  20   0 2034m 671m 6632 S  0.3 16.4  57:36.62 java
28610 my        20   0 17288 1380 1080 R  0.3  0.0   0:00.03 top
    1 root      20   0 24148 1804 1060 S  0.0  0.0   0:05.11 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd/107656
    3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper/107656
    4 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/0
    5 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
    6 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/2
    7 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/3
    8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/4
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/5
   10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/6
   11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/7
   12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/8
   13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/9
   14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   16 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   17 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   19 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/1
   24 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/2
   25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/2
   26 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/2
   27 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/107656/2
   28 root      20   0     0    0    0 S  0.0  0.0   0:00.00 nfsiod/107656

回答1:

If you do not have swap activated your process will fail if there is not enough memory avaiable, it like sounds that is the issue.

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04