MeanIO (linnovate) mon goose проблема с памятью - PullRequest
0 голосов
/ 17 марта 2020

У меня странная проблема с MeanIO из linnovate. Мы используем очень старую версию средних и связанных npm пакетов, но обновленную до последней версии узла 12.xx. Один из моих API делает утечку памяти, но если я вызываю API после замены значения одного поля другим (идентификатором драйвера), это работает без проблем. Эта проблема видна только с набором из 10 пользователей. Мы также заменили содержимое рабочего идентификатора содержимым нерабочего идентификатора, но не смогли воссоздать проблему с памятью. PM2 перезапускается после того, как память достигает предела. Заранее спасибо.

npm Пн goose версия - 4.13.20 npm Версия MongoDb - 2.2.34 express версия - 4.17.1 Версия узла - 12.14.1

Смотрите отчет с сервера

    {
    "header": {


     "reportVersion": 1,
    "event": "Allocation failed - JavaScript heap out of memory",
    "trigger": "FatalError",
    "filename": "report.20200317.115557.3420.0.001.json",
    "dumpEventTime": "2020-03-17T11:55:57Z",
    "dumpEventTimeStamp": "1584446157955",
    "processId": 3420,
    "cwd": "/home/ubuntu/testnow",
    "commandLine": [
      "/home/ubuntu/.nvm/versions/node/v12.14.1/bin/node",
      "/home/ubuntu/.nvm/versions/node/v12.14.1/lib/node_modules/pm2/lib/ProcessContainer.js"
    ],
    "nodejsVersion": "v12.14.1",
    "glibcVersionRuntime": "2.19",
    "glibcVersionCompiler": "2.17",
    "wordSize": 64,
    "arch": "x64",
    "platform": "linux",
    "componentVersions": {
      "node": "12.14.1",
      "v8": "7.7.299.13-node.16",
      "uv": "1.33.1",
      "zlib": "1.2.11",
      "brotli": "1.0.7",
      "ares": "1.15.0",
      "modules": "72",
      "nghttp2": "1.40.0",
      "napi": "5",
      "llhttp": "2.0.1",
      "http_parser": "2.8.0",
      "openssl": "1.1.1d",
      "cldr": "35.1",
      "icu": "64.2",
      "tz": "2019c",
      "unicode": "12.1"
    },
    "release": {
      "name": "node",
      "lts": "Erbium",
      "headersUrl": "https://nodejs.org/download/release/v12.14.1/node-v12.14.1-headers.tar.gz",
      "sourceUrl": "https://nodejs.org/download/release/v12.14.1/node-v12.14.1.tar.gz"
    },
    "osName": "Linux",
    "osRelease": "3.13.0-74-generic",
    "osVersion": "#118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015",
    "osMachine": "x86_64",
    "cpus": [
      {
        "model": "Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz",
        "speed": 2300,
        "user": 2743400,
        "nice": 3000,
        "sys": 142800,
        "idle": 17453600,
        "irq": 0
      },
      {
        "model": "Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz",
        "speed": 2300,
        "user": 2784000,
        "nice": 2300,
        "sys": 138300,
        "idle": 17456600,
        "irq": 0
      }
    ],
    "networkInterfaces": [
      {
        "name": "lo",
        "internal": true,
        "mac": "00:00:00:00:00:00",
        "address": "127.0.0.1",
        "netmask": "255.0.0.0",
        "family": "IPv4"
      },
      {
        "name": "eth0",
        "internal": false,
        "mac": "12:dd:8e:d5:16:79",
        "address": "10.0.0.136",
        "netmask": "255.255.255.0",
        "family": "IPv4"
      },
      {
        "name": "lo",
        "internal": true,
        "mac": "00:00:00:00:00:00",
        "address": "::1",
        "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
        "family": "IPv6",
        "scopeid": 0
      },
      {
        "name": "eth0",
        "internal": false,
        "mac": "12:dd:8e:d5:16:79",
        "address": "fe80::10dd:8eff:fed5:1679",
        "netmask": "ffff:ffff:ffff:ffff::",
        "family": "IPv6",
        "scopeid": 2
      }
    ],
    "host": ""
     },
  "javascriptStack": {
    "message": "No stack.",
    "stack": [
      "Unavailable."
    ]
  },
  "nativeStack": [
    {
      "pc": "0x0000000000b05ba5",
      "symbol": "report::TriggerNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::string const&, v8::Local<v8::String>) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x00000000009dbd93",
      "symbol": "node::OnFatalError(char const*, char const*) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000b3b18e",
      "symbol": "v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000b3b509",
      "symbol": "v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000ce68a5",
      "symbol": " [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000ce6f36",
      "symbol": "v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000cf2dca",
      "symbol": "v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000cf3cd5",
      "symbol": "v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000cf66e8",
      "symbol": "v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000cbd017",
      "symbol": "v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000000ff307b",
      "symbol": "v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node /home/ubuntu/testnow/server.js]"
    },
    {
      "pc": "0x0000000001376259",
      "symbol": " [node /home/ubuntu/testnow/server.js]"
    }
  ],
  "javascriptHeap": {
    "totalMemory": 2095775744,
    "totalCommittedMemory": 2083874352,
    "usedMemory": 2044777928,
    "availableMemory": 54221744,
    "memoryLimit": 2122317824,
    "heapSpaces": {
      "read_only_space": {
        "memorySize": 262144,
        "committedMemory": 32568,
        "capacity": 261872,
        "used": 32296,
        "available": 229576
      },
      "new_space": {
        "memorySize": 15728640,
        "committedMemory": 4358696,
        "capacity": 7856160,
        "used": 575072,
        "available": 7281088
      },
      "old_space": {
        "memorySize": 2048241664,
        "committedMemory": 2047986928,
        "capacity": 2027240904,
        "used": 2014928064,
        "available": 12312840
      },
      "code_space": {
        "memorySize": 1736704,
        "committedMemory": 1690176,
        "capacity": 1329824,
        "used": 1329824,
        "available": 0
      },
      "map_space": {
        "memorySize": 4460544,
        "committedMemory": 4459936,
        "capacity": 2770400,
        "used": 2770400,
        "available": 0
      },
      "large_object_space": {
        "memorySize": 25296896,
        "committedMemory": 25296896,
        "capacity": 25138720,
        "used": 25138720,
        "available": 0
      },
      "code_large_object_space": {
        "memorySize": 49152,
        "committedMemory": 49152,
        "capacity": 3552,
        "used": 3552,
        "available": 0
      },
      "new_large_object_space": {
        "memorySize": 0,
        "committedMemory": 0,
        "capacity": 7856160,
        "used": 0,
        "available": 7856160
      }
    }
  },
  "resourceUsage": {
    "userCpuSeconds": 73.4299,
    "kernelCpuSeconds": 1.7672,
    "cpuConsumptionPercent": 82.6342,
    "maxRss": 2180526080,
    "pageFaults": {
      "IORequired": 0,
      "IONotRequired": 627210
    },
    "fsActivity": {
      "reads": 0,
      "writes": 72
    }
  },
  "uvthreadResourceUsage": {
    "userCpuSeconds": 40.633,
    "kernelCpuSeconds": 1.01391,
    "cpuConsumptionPercent": 45.7658,
    "fsActivity": {
      "reads": 0,
      "writes": 40
    }
  },
  "libuv": [
  ],
  "environmentVariables": {
    "SILENT": "true",
    "PM2_HOME": "/home/ubuntu/.pm2",
    "PM2_USAGE": "CLI",
    "_": "/home/ubuntu/.nvm/versions/node/v12.14.1/bin/pm2",
    "XDG_RUNTIME_DIR": "/run/user/1000",
    "LOGNAME": "ubuntu",
    "XDG_SEAT": "seat0",
    "HOME": "/home/ubuntu",
    "SHLVL": "1",
    "NODE_PATH": "/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript",
    "LANG": "en_US.UTF-8",
    "PWD": "/home/ubuntu/testnow",
    "PATH": "/home/ubuntu/.nvm/versions/node/v12.14.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games",
    "MAIL": "/var/mail/ubuntu",
    "USER": "ubuntu",
    "TERM": "xterm",
    "SHELL": "/bin/bash",
    "XDG_SESSION_ID": "3",
    "windowsHide": "true",
    "kill_retry_time": "100",
    "username": "ubuntu",
    "treekill": "true",
    "automation": "true",
    "pmx": "true",
    "instance_var": "NODE_APP_INSTANCE",
    "watch": "false",
    "autorestart": "true",
    "vizion": "true",
    "merge_logs": "true",
    "instances": "2",
    "env": "[object Object]",
    "namespace": "default",
    "name": "server",
    "node_args": "",
    "pm_exec_path": "/home/ubuntu/testnow/server.js",
    "pm_cwd": "/home/ubuntu/testnow",
    "exec_interpreter": "node",
    "exec_mode": "cluster_mode",
    "pm_out_log_path": "/home/ubuntu/.pm2/logs/server-out.log",
    "pm_err_log_path": "/home/ubuntu/.pm2/logs/server-error.log",
    "pm_pid_path": "/home/ubuntu/.pm2/pids/server-1.pid",
    "km_link": "false",
    "vizion_running": "false",
    "NODE_APP_INSTANCE": "1",
    "LESSCLOSE": "/usr/bin/lesspipe %s %s",
    "LESSOPEN": "| /usr/bin/lesspipe %s",
    "NVM_BIN": "/home/ubuntu/.nvm/versions/node/v12.14.1/bin",
    "SSH_CONNECTION": "103.5.134.163 52753 10.0.0.136 22",
    "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:",
    "NVM_DIR": "/home/ubuntu/.nvm",
    "SSH_TTY": "/dev/pts/2",
    "OLDPWD": "/home/ubuntu",
    "SSH_CLIENT": "103.5.134.163 52753 22",
    "NVM_CD_FLAGS": "",
    "unique_id": "fb1d4ffc-1482-41e4-80ee-1baf862ed470",
    "status": "launching",
    "pm_uptime": "1584446066080",
    "axm_actions": "",
    "axm_monitor": "[object Object]",
    "axm_options": "[object Object]",
    "axm_dynamic": "[object Object]",
    "created_at": "1584446066080",
    "pm_id": "1",
    "restart_time": "0",
    "unstable_restarts": "0",
    "_pm2_version": "4.2.3",
    "NODE_CONFIG_DIR": "./config/env",
    "NODE_ENV": "production"
  },
  "userLimits": {
    "core_file_size_blocks": {
      "soft": 0,
      "hard": "unlimited"
    },
    "data_seg_size_kbytes": {
      "soft": "unlimited",
      "hard": "unlimited"
    },
    "file_size_blocks": {
      "soft": "unlimited",
      "hard": "unlimited"
    },
    "max_locked_memory_bytes": {
      "soft": 65536,
      "hard": 65536
    },
    "max_memory_size_kbytes": {
      "soft": "unlimited",
      "hard": "unlimited"
    },
    "open_files": {
      "soft": 4096,
      "hard": 4096
    },
    "stack_size_bytes": {
      "soft": 8388608,
      "hard": "unlimited"
    },
    "cpu_time_seconds": {
      "soft": "unlimited",
      "hard": "unlimited"
    },
    "max_user_processes": {
      "soft": 31538,
      "hard": 31538
    },
    "virtual_memory_kbytes": {
      "soft": "unlimited",
      "hard": "unlimited"
    }
  },
  "sharedObjects": [
    "/lib/x86_64-linux-gnu/liboneagentproc.so",
    "/lib/x86_64-linux-gnu/libdl.so.2",
    "/usr/lib/x86_64-linux-gnu/libstdc++.so.6",
    "/lib/x86_64-linux-gnu/libm.so.6",
    "/lib/x86_64-linux-gnu/libgcc_s.so.1",
    "/lib/x86_64-linux-gnu/libpthread.so.0",
    "/lib/x86_64-linux-gnu/libc.so.6",
    "/lib64/ld-linux-x86-64.so.2",
    "/lib/x86_64-linux-gnu/libnss_files.so.2",
    "/lib/x86_64-linux-gnu/libnss_dns.so.2",
    "/lib/x86_64-linux-gnu/libresolv.so.2"
  ]
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...