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

DeprecationWarning: worker.suicide is deprecated #2780

Closed
svipas opened this issue Mar 19, 2017 · 19 comments
Closed

DeprecationWarning: worker.suicide is deprecated #2780

svipas opened this issue Mar 19, 2017 · 19 comments

Comments

@svipas
Copy link

svipas commented Mar 19, 2017

Bug

2017-03-19 17:45:49: (node:4680) DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect

Software versions used

OS         : Linux Ubuntu 16.04
node.js    : v7.7.3
PM2        : v2.4.2

PM2 Log output

2017-03-19 17:45:49: Starting execution sequence in -cluster mode- for app name:server id:0
2017-03-19 17:45:49: App name:server id:0 online
2017-03-19 17:45:49: Starting execution sequence in -cluster mode- for app name:server id:1
2017-03-19 17:45:49: (node:4680) DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
2017-03-19 17:45:49: App name:server id:1 online
2017-03-19 17:45:49: Starting execution sequence in -cluster mode- for app name:server id:2
2017-03-19 17:45:49: (node:4680) DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
2017-03-19 17:45:49: App name:server id:2 online
2017-03-19 17:45:49: Starting execution sequence in -cluster mode- for app name:server id:3
2017-03-19 17:45:49: (node:4680) DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
2017-03-19 17:45:49: App name:server id:3 online
2017-03-19 17:45:49: (node:4680) DeprecationWarning: worker.suicide is deprecated. Please use worker.exitedAfterDisconnect.
@vmarchaud
Copy link
Contributor

vmarchaud commented Mar 21, 2017

Are you sure that your daemon is up-to-date ? Try making a pm2 update and see if the warning is still there.

@svipas
Copy link
Author

svipas commented Mar 21, 2017

@vmarchaud PM version 2.4.2, did and still the same warning.

@sanpoChew
Copy link

sanpoChew commented Mar 23, 2017

can confirm, getting the same warning with pm2 2.4.2 and node 7.7.2

@jyotman
Copy link

jyotman commented Apr 14, 2017

Same here on Ubuntu 16.04!
pm2 2.4.4
node 7.9.0

@damianobarbati
Copy link

news on this?

@vmarchaud
Copy link
Contributor

It's a warning, you can ignore it.

@Unitech
Copy link
Owner

Unitech commented Apr 15, 2017 via email

@isaacs
Copy link

isaacs commented Jun 15, 2017

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.

@vmarchaud
Copy link
Contributor

vmarchaud commented Jun 15, 2017

@isaacs I read the PR over nodejs/node#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 ^^)

@isaacs
Copy link

isaacs commented Jun 20, 2017

@vmarchaud Any update on this? This is me pinging you because maybe you forgot :)

@vmarchaud
Copy link
Contributor

vmarchaud commented Jun 20, 2017

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.

@vmarchaud
Copy link
Contributor

@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.

@soyuka
Copy link
Collaborator

soyuka commented Jun 21, 2017

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.

@extensionsapp
Copy link

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.

@soyuka
Copy link
Collaborator

soyuka commented Sep 11, 2017

@extensionsapp the deprecation is not related and is not the one responsible of the app being killed.

@soyuka soyuka closed this as completed Sep 11, 2017
@epozsh
Copy link

epozsh commented Apr 30, 2018

Hello,

in version 2.10.3 the warning still there.

@feryardiant
Copy link

feryardiant commented May 4, 2018

Same issue with v2.10.3

image

@asfo
Copy link

asfo commented Sep 10, 2018

Same issue with v3.1.2

@vmarchaud
Copy link
Contributor

Please ignore it, it's not a problem

Repository owner locked as resolved and limited conversation to collaborators Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests