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

Cluster process not killed when listening on SIGINT process #2061

Closed
Unitech opened this issue Apr 1, 2016 · 9 comments
Closed

Cluster process not killed when listening on SIGINT process #2061

Unitech opened this issue Apr 1, 2016 · 9 comments
Labels

Comments

@Unitech
Copy link
Owner

Unitech commented Apr 1, 2016

#1983 #1974 #1748 #1043 #2043 #1702 #1422

Replace Node.js process.kill by treeKill

Bug: pid can not be killed Error: kill ESRCH

@Unitech
Copy link
Owner Author

Unitech commented Apr 3, 2016

Update available ([email protected] - latest stable):

$ npm install pm2@latest -g
$ pm2 update

Please re-open this issue if you notice any problem,

@Unitech Unitech closed this as completed Apr 3, 2016
@somehibs
Copy link

I've had this occur on a recent version of pm2. The app that crashed is #3, and has been renamed to APPNAME for privacy reasons. Unrelated applications renamed to APP. As you can see, I had to run pm2 update, and then kill it after it hung, before running it again.

If this occurs again, is there anything I can do to log with additional verbosity when running pm2 update? Might be able to determine what causes it to hang, and perhaps that would aid in root cause analysis.

pm2 -v
2.10.1

$ pm2 start APPNAME
[PM2] Applying action restartProcessId on app [APPNAME](ids: 3)
[PM2][ERROR] Process 3 not found
┌─────────────────┬────┬──────┬───────┬─────────┬─────────┬────────┬─────┬────────────┬─────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
├─────────────────┼────┼──────┼───────┼─────────┼─────────┼────────┼─────┼────────────┼─────────┼──────────┤
│ APP │ 1 │ fork │ 14625 │ online │ 1 │ 11D │ 0% │ 52.1 MB │ user │ disabled │
│ APP │ 2 │ fork │ 1819 │ online │ 436 │ 39h │ 0% │ 127.4 MB │ user │ disabled │
│ APP │ 4 │ fork │ 5412 │ online │ 0 │ 20D │ 0% │ 44.4 MB │ user │ disabled │
│ APP │ 0 │ fork │ 0 │ errored │ 15 │ 0 │ 0% │ 0 B │ user │ disabled │
│ APPNAME │ 3 │ fork │ 5406 │ stopped │ 1 │ 0 │ 0% │ 0 B │ user │ disabled │
└─────────────────┴────┴──────┴───────┴─────────┴─────────┴────────┴─────┴────────────┴─────────┴──────────┘

$ pm2 stop APPNAME
[PM2] Applying action stopProcessId on app [APPNAME](ids: 3)
[PM2] APPNAME

$ pm2 start APPNAME
[PM2] Applying action restartProcessId on app [APPNAME](ids: 3)
[PM2][ERROR] Process 3 not found

pm2 update
Be sure to have the latest version by doing npm install pm2@latest -g before doing this procedure.
[PM2] Saving current process list...
[PM2] Stopping PM2...
[PM2] Applying action deleteProcessId on app [all](ids: 0,1,2,3,4)
[PM2] all
(hangs)
(ctrl+c)

pm2 update
Be sure to have the latest version by doing npm install pm2@latest -g before doing this procedure.
[PM2] Saving current process list...
[PM2] Stopping PM2...
[PM2] Applying action deleteProcessId on app [all](ids: 1,2,3,4)
[PM2] APPNAME
[PM2] APP
[PM2] APP
[PM2] APP
[PM2] All processes have been stopped and deleted
[PM2] PM2 stopped
[PM2] Spawning PM2 daemon with pm2_home=/home/user/.pm2
[PM2] Restoring processes located in /home/user/.pm2/dump.pm2
[PM2] Process APP restored
[PM2] Process APP restored
[PM2] Process APPNAME restored
[PM2] Process APP restored

PM2 updated

@jesseg34
Copy link

jesseg34 commented Mar 6, 2020

I am having the same issue on version 3.1.3.

@jonathansolorzn
Copy link

I'm having this issue too

1 similar comment
@imjeffparedes
Copy link

I'm having this issue too

@antongorodezkiy
Copy link

I got this issue with [email protected]

@djohts
Copy link

djohts commented Jun 13, 2021

got this issue on v5.1.0

@jegsar
Copy link

jegsar commented Mar 7, 2022

This is still an issue on pm2 5.1.2
This happens when using pm2 reload, pm2 reload , and pm2 reload .
It doesn't always happen, but it happens sometimes.

pm2 update always fixes it but that defeats the purpose of pm2 reload.

@Jivings
Copy link

Jivings commented Nov 21, 2022

This issue is still occurring and should be re-opened.

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

No branches or pull requests

9 participants