Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network latency metric - ping against google DNS is high #4452

Closed
Unitech opened this issue Oct 15, 2019 · 7 comments
Closed

network latency metric - ping against google DNS is high #4452

Unitech opened this issue Oct 15, 2019 · 7 comments

Comments

@Unitech
Copy link
Owner

Unitech commented Oct 15, 2019

2000ms
https://github.com/Unitech/pm2/blob/master/lib/Sysinfo/SystemInfo.js#L466

@tizzyapunkt
Copy link

When you look at the captures, you can see that it pings google like 10 times a second which is kinda high :)

staging1-pings.pcap.zip

Here is the report dump

--- PM2 report ----------------------------------------------------------------
Date                 : Tue Oct 15 2019 13:49:53 GMT+0200 (CEST)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 4.0.2
node version         : 10.3.0
node path            : /data/nvm/.nvm/versions/node/v10.3.0/bin/pm2
argv                 : /data/nvm/.nvm/versions/node/v10.3.0/bin/node,/data/nvm/.nvm/versions/node/v10.3.0/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : nvm
uid                  : 2000
gid                  : 2000
uptime               : 161min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 4.0.2
node version         : 10.3.0
node path            : /data/nvm/.nvm/versions/node/v10.3.0/bin/pm2
argv                 : /data/nvm/.nvm/versions/node/v10.3.0/bin/node,/data/nvm/.nvm/versions/node/v10.3.0/bin/pm2,report
argv0                : node
user                 : nvm
uid                  : 2000
gid                  : 2000
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : freebsd
type                 : FreeBSD
cpus                 : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
cpus nb              : 2
freemem              : 684703744
totalmem             : 4254642176
home                 : /data/nvm
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬─────────────────────────┬─────────┬─────────┬──────────┬────────┬──────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name                    │ version │ mode    │ pid      │ uptime │ ↺    │ status   │ cpu      │ mem      │ user     │ watching │
└────┴─────────────────────────┴─────────┴─────────┴──────────┴────────┴──────┴──────────┴──────────┴──────────┴──────────┴──────────┘
Module
┌────┬───────────────────────────────────────┬────────────────────┬───────┬──────────┬──────┬──────────┬──────────┬──────────┐
│ id │ module                                │ version            │ pid   │ status   │ ↺    │ cpu      │ mem      │ user     │
├────┼───────────────────────────────────────┼────────────────────┼───────┼──────────┼──────┼──────────┼──────────┼──────────┤
│ 1  │ pm2-logrotate                         │ 2.6.0              │ 84782 │ online   │ 0    │ 0%       │ 53.7mb   │ nvm      │
└────┴───────────────────────────────────────┴────────────────────┴───────┴──────────┴──────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/data/nvm/.pm2/pm2.log last 20 lines:
PM2        |     at maybeClose (internal/child_process.js:961:16)
PM2        |     at Socket.stream.socket.on (internal/child_process.js:380:11)
PM2        |     at Socket.emit (events.js:182:13)
PM2        |     at Pipe._handle.close [as _onclose] (net.js:596:12)
PM2        | 2019-10-15T13:49:53: PM2 log: systeminfos collection process offline with code 1
PM2        | /data/nvm/.nvm/versions/node/v10.3.0/lib/node_modules/pm2/node_modules/systeminformation/lib/network.js:807
PM2        |                 let proc = line[6].split('/');
PM2        |                                    ^
PM2        | 
PM2        | TypeError: Cannot read property 'split' of undefined
PM2        |     at /data/nvm/.nvm/versions/node/v10.3.0/lib/node_modules/pm2/node_modules/systeminformation/lib/network.js:807:36
PM2        |     at Array.forEach (<anonymous>)
PM2        |     at /data/nvm/.nvm/versions/node/v10.3.0/lib/node_modules/pm2/node_modules/systeminformation/lib/network.js:786:19
PM2        |     at ChildProcess.exithandler (child_process.js:282:7)
PM2        |     at ChildProcess.emit (events.js:182:13)
PM2        |     at maybeClose (internal/child_process.js:961:16)
PM2        |     at Socket.stream.socket.on (internal/child_process.js:380:11)
PM2        |     at Socket.emit (events.js:182:13)
PM2        |     at Pipe._handle.close [as _onclose] (net.js:596:12)
PM2        | 2019-10-15T13:49:53: PM2 log: systeminfos collection process offline with code 1

As I can see, there is something happening in the network module, maybe its related to that?

@Unitech
Copy link
Owner Author

Unitech commented Oct 15, 2019

published on 4.1.2

@Unitech Unitech closed this as completed Oct 15, 2019
@Unitech
Copy link
Owner Author

Unitech commented Oct 15, 2019

and btw interesting to see the PM2 log report, it seems that there is an issue with the network and systeminformation. PM2 might repop the external process multiple time, increasing the number of network check towards google. I've disabled the system metrics collector for now anyway in every version while we figure out a hardened solution
cc @sebhildebrandt

@sebhildebrandt
Copy link

sebhildebrandt commented Oct 15, 2019

Started to investigate this (on systeminformation side)...

@sebhildebrandt
Copy link

sebhildebrandt commented Oct 15, 2019

fixed issue causing crash in network.js in dependency package systeminformation (v4.14.13 should contain the fix).

@Unitech
Copy link
Owner Author

Unitech commented Oct 15, 2019

Great!

@sebhildebrandt
Copy link

@Unitech please let me know, if I also should have a look on the measurement of internet latency against google DNS or is the problem described not directly related to systeminformation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants