Closed svipas closed 7 years ago
Are you sure that your daemon is up-to-date ? Try making a pm2 update
and see if the warning is still there.
@vmarchaud PM version 2.4.2, did and still the same warning.
can confirm, getting the same warning with pm2 2.4.2 and node 7.7.2
Same here on Ubuntu 16.04! pm2 2.4.4 node 7.9.0
news on this?
It's a warning, you can ignore it.
we never use .suicide in pm2, I don't understand how this warning end up in logs
Is it possible to run your app with the --trace-deprecation
argument? Like node --trace-deprecation my-app.js
This will show where the deprecated API is being used.
@isaacs I read the PR over https://github.com/nodejs/node/pull/13684, currently i am maintaining PM2.
But as Unitech said, we dropped the use of worker.suicide
already few months back so we don't really understand from where it can be coming.
I actually run on the issue localy multiple times but ignored it, i'll try with --trace-deprecation
tomorrow (don't hesitate to ping me i might forget ^^)
@vmarchaud Any update on this? This is me pinging you because maybe you forgot :)
Able to reproduce, it's coming from a dependency fclone
, could you check it out @soyuka ?
2017-06-20 21:20:22: (node:30836) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
at fclone (/home/vmarchaud/keymetrics/pm2/node_modules/fclone/dist/fclone.js:74:32)
at Object.clone (/home/vmarchaud/keymetrics/pm2/lib/Utility.js:60:12)
at /home/vmarchaud/keymetrics/pm2/lib/God/ActionMethods.js:204:32
at ready (/home/vmarchaud/keymetrics/pm2/lib/God.js:150:15)
at Worker.<anonymous> (/home/vmarchaud/keymetrics/pm2/lib/God.js:197:18)
at Object.onceWrapper (events.js:312:19)
at emitNone (events.js:105:13)
at Worker.emit (events.js:207:7)
at online (internal/cluster/master.js:249:10)
at Worker.onmessage (internal/cluster/master.js:236:5)
Corresponding to this line in the source
EDIT: Looks like its a little problem with the cloning of enumerable property.
@isaacs I don't think we can actually avoid accessing worker.suicide
because we can't just hardcode a key inside fclone
to ignore it and we need to access it anyway to see if it's a function.
But anyway it should have no impact if removed since we don't use it.
I propose we close this as a wontfix
. We don't use worker.suicide
and therefore we can safely ignore the warning. This warning only shows up because we access the suicide
getter, without calling the method.
Hello.
PM2 | App name:hello.com id:1 online
PM2 | (node:14176) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | Change detected on path core for app hello.com - restarting
PM2 | Stopping app:hello.com id:1
PM2 | pid=20058 msg=failed to kill - retrying in 100ms
PM2 | pid=20058 msg=failed to kill - retrying in 100ms
PM2 | pid=20058 msg=failed to kill - retrying in 100ms
PM2 | Process with pid 20058 still alive after 1600ms, sending it SIGKILL now...
PM2 | App name:hello.com id:1 disconnected
PM2 | App [hello.com] with id [1] and pid [20058], exited with code [0] via signal [SIGABRT]
PM2 | pid=20058 msg=process killed
PM2 | Starting execution sequence in -cluster mode- for app name:hello.com id:1
PM2 | App name:hello.com id:1 online
PM2 | (node:14176) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
PM2 | Change detected on path core for app hello.com - restarting
PM2 | Stopping app:hello.com id:1
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | pid=20083 msg=failed to kill - retrying in 100ms
PM2 | Process with pid 20083 still alive after 1600ms, sending it SIGKILL now...
PM2 | App name:hello.com id:1 disconnected
PM2 | App [hello.com] with id [1] and pid [20083], exited with code [0] via signal [SIGABRT]
PM2 | pid=20083 msg=process killed
PM2 | Starting execution sequence in -cluster mode- for app name:hello.com id:1
PM2 | App name:hello.com id:1 online
PM2 | (node:14176) [DEP0007] DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
@extensionsapp the deprecation is not related and is not the one responsible of the app being killed.
Hello,
in version 2.10.3 the warning still there.
Same issue with v2.10.3
Same issue with v3.1.2
Please ignore it, it's not a problem
Bug
2017-03-19 17:45:49: (node:4680) DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect
Software versions used
PM2 Log output