CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

Problème avec appli nodeJS

fazow
fazow
Niveau 74
04 décembre 2017 à 22:28:56

Salut

J'ai un VPS sur lequel j'ai installé nodejs (via nvm) et pm2.
Le soucis c'est que quand je lance l'appli avec pm2 un jour ou 2 après elle ne repond plus.
Quand je me connecte en ssh sur le serveur pour voir la liste des daemon en cours en faisant un "pm2 list" j'ai tableau vide. Comme si le daemon de me appli avait était supprimé.

A quoi cela peut etre du ?
Mon VPS reboot tout seul ?
pm2 se relance tout seul ?
Mauvaise config nodejs ?

SuperNG1Chuck
SuperNG1Chuck
Niveau 10
04 décembre 2017 à 22:38:14

Tes sur que y a pas de plantage ? T'as des log ?
T'as programme un restart automatique de l'appli quand elle se ferme ou pas ?
Moi j'utilise "forever" pour gérer ça tout seul

Message édité le 04 décembre 2017 à 22:39:18 par SuperNG1Chuck
fazow
fazow
Niveau 74
04 décembre 2017 à 22:56:04

pm2 fait la même chose que forever normalement

Voila les logs depuis le lancement de l'appli :


2017-12-03 14:18:07: Starting execution sequence in -fork mode- for app name:mmtd-api id:1
2017-12-03 14:18:07: App name:mmtd-api id:1 online
2017-12-04 17:31:12: [PM2][WORKER] Error caught by domain:
Error: spawn ENOMEM
    at _errnoException (util.js:1021:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:494:9)
    at Object.exports.execFile (child_process.js:209:15)
    at exports.exec (child_process.js:139:18)
    at getBranch (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/lib/git.js:53:5)
    at fn (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:746:34)
    at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:1213:16
    at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:166:37
    at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:706:43
2017-12-04 17:31:42: [PM2][WORKER] Error caught by domain:
Error: spawn ENOMEM
    at _errnoException (util.js:1021:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:494:9)
    at Object.exports.execFile (child_process.js:209:15)
    at exports.exec (child_process.js:139:18)
    at getStaged (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/lib/git.js:43:5)
    at fn (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:746:34)
    at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:1213:16
    at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:166:37
    at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:706:43

<--- Last few GCs --->

[25633:0x241d0d0] 237639080 ms: Scavenge 14.6 (21.9) -> 13.6 (21.9) MB, 11.2 / 1.1 ms  allocation failure 
[25633:0x241d0d0] 237763057 ms: Scavenge 14.6 (21.9) -> 13.7 (21.9) MB, 33.7 / 1.9 ms  allocation failure 
[25633:0x241d0d0] 237890960 ms: Scavenge 14.6 (21.9) -> 13.6 (21.9) MB, 6.0 / 0.8 ms  allocation failure 
[25633:0x241d0d0] 238017535 ms: Scavenge 14.6 (21.9) -> 13.6 (21.9) MB, 11.7 / 0.4 ms  allocation failure 


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x264e8fca5e71 <JSObject>
    0: builtin exit frame: parse(this=0x264e8fc88fd1 <Object map = 0x397b11c82ba1>,0x32071757fe31 <String[91]: {"type":"axm:monitor","data":{"Loop delay":{"value":"1.09ms","agg_type":"avg","alert":{}}}}>)

    1: onread [internal/child_process.js:~453] [pc=0x31d4730f3e8c](this=0x10200983a0a9 <Pipe map = 0x36186559da59>,nread=92,pool=0x32071757fcc9 <Uint8Array map = 0x3618655b1591>,recvHandle=0xe...

FATAL ERROR: Committing semi space failed. Allocation failed - process out of memory
 1: node::Abort() [PM2 v2.8.0: God Daemon (/root/.pm2)]
 2: 0x1217ecc [PM2 v2.8.0: God Daemon (/root/.pm2)]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [PM2 v2.8.0: God Daemon (/root/.pm2)]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [PM2 v2.8.0: God Daemon (/root/.pm2)]
 5: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [PM2 v2.8.0: God Daemon (/root/.pm2)]
 6: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [PM2 v2.8.0: God Daemon (/root/.pm2)]
 7: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [PM2 v2.8.0: God Daemon (/root/.pm2)]
 8: v8::internal::Handle<v8::internal::String> v8::internal::JsonParser<false>::ScanJsonString<false>() [PM2 v2.8.0: God Daemon (/root/.pm2)]
 9: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
10: v8::internal::JsonParser<false>::ParseJsonObject() [PM2 v2.8.0: God Daemon (/root/.pm2)]
11: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
12: v8::internal::JsonParser<false>::ParseJsonObject() [PM2 v2.8.0: God Daemon (/root/.pm2)]
13: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
14: v8::internal::JsonParser<false>::ParseJsonObject() [PM2 v2.8.0: God Daemon (/root/.pm2)]
15: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
16: v8::internal::JsonParser<false>::ParseJson() [PM2 v2.8.0: God Daemon (/root/.pm2)]
17: v8::internal::Builtin_JsonParse(int, v8::internal::Object**, v8::internal::Isolate*) [PM2 v2.8.0: God Daemon (/root/.pm2)]
18: 0x31d472f8441d
2017-12-04 21:55:53: ===============================================================================
2017-12-04 21:55:53: --- New PM2 Daemon started ----------------------------------------------------
2017-12-04 21:55:53: Time                 : Mon Dec 04 2017 21:55:53 GMT+0100 (CET)
2017-12-04 21:55:53: PM2 version          : 2.8.0
2017-12-04 21:55:53: Node.js version      : 8.7.0
2017-12-04 21:55:53: Current arch         : x64
2017-12-04 21:55:53: PM2 home             : /root/.pm2
2017-12-04 21:55:53: PM2 PID file         : /root/.pm2/pm2.pid
2017-12-04 21:55:53: RPC socket file      : /root/.pm2/rpc.sock
2017-12-04 21:55:53: BUS socket file      : /root/.pm2/pub.sock
2017-12-04 21:55:53: Application log path : /root/.pm2/logs
2017-12-04 21:55:53: Process dump file    : /root/.pm2/dump.pm2
2017-12-04 21:55:53: Concurrent actions   : 2
2017-12-04 21:55:53: SIGTERM timeout      : 1600
2017-12-04 21:55:53: ===============================================================================
Tacha-tepoilu
Tacha-tepoilu
Niveau 12
05 décembre 2017 à 12:48:19

Visiblement utiliser pm2 n'est pas très recommandé.

fazow
fazow
Niveau 74
05 décembre 2017 à 13:06:35

Ah.
Je pensais qu'il était plus fiable que forever

fazow
fazow
Niveau 74
05 décembre 2017 à 19:55:44

En fait c'est un problème de mémoire au niveau de mon VPS.

Sous forums
  • Aide à l'achat Mac
  • Steam Deck
  • Création de sites web
  • Création de Jeux
  • Linux
  • Programmation
  • Internet
  • Macintosh
  • Hardware
La vidéo du moment