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

PM2 stop causes restart of process #929

Closed
ibrahimab opened this issue Jan 9, 2015 · 6 comments
Closed

PM2 stop causes restart of process #929

ibrahimab opened this issue Jan 9, 2015 · 6 comments

Comments

@ibrahimab
Copy link

Hi,

I am using node v0.10.24, npm version 1.3.21, pm2 version 0.12.3
I just updated pm2 and want to stop a process, but pm2 keeps respawning the process:

pm2 list
Process Name | 0 | fork | 32122 | online | 0 | 15m | 23.334 MB | disabled

pm2 stop 0
Process Name | 0 | fork | 32122 | online | 0 | 0 | 0 B | disabled

pm2 list
Process Name | 0 | fork | 24768 | online | 0 | 3s | 22.562 MB | disabled

@Tjatse
Copy link
Collaborator

Tjatse commented Jan 9, 2015

Did you update PM2 in memory?

$ pm2 updatePM2

@davidcalloway
Copy link

I am experiencing this problem as well, node v0.10.35, npm v1.4.28, pm2 v0.12.3. However, it appears to only appear if the script has a server socket running.

pm2 stop [id] appears to restart the process, not stop it.
Similarly, pm2 restart [id] on a running process will stop (and then restart) the process, then start another instance (apparently hidden).
This means that pm2 stop will restart, and pm2 restart will create another instance that constantly dies (in my case) with EADDRINUSE.

For me, I had to pm2 delete [id] and manually kill [pid] the still-running process to get pm2 into a usable state.

@Tjatse
Copy link
Collaborator

Tjatse commented Jan 17, 2015

Hi, @ruquay Maybe it is too later, but could you provide any sample codes to help me reproduce this? (gists will be fine).

@soyuka soyuka added the waiting label Jan 29, 2015
@davidcalloway
Copy link

@Tjatse I have made a few efforts to reliably reproduce this, but have been unable to do so. I think this occurred for me between upgrading and restarting a server, since then the problem has -- at least for me -- disappeared. Perhaps @ibrahimab can still come up with something?

@ibrahimab
Copy link
Author

I have been unable to reproduce this as I deleted all my processes, remove pm2 completely from my system en did a clean install and added the processes again. Since then they cleanly close.

I did update pm2 with the updatePM2 command. I'll try it again when a new update for pm2 is available!

jshkurti added a commit that referenced this issue Feb 27, 2015
@jshkurti jshkurti self-assigned this Feb 28, 2015
@jshkurti
Copy link
Contributor

This is fixed on the last version of development .
It will be on the next release which is coming very soon.
Thanks for the feedback guys @ibrahimab @ruquay :)

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

No branches or pull requests

5 participants