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 doesn't stop app #715

Closed
pkopac opened this issue Sep 16, 2014 · 2 comments
Closed

pm2 doesn't stop app #715

pkopac opened this issue Sep 16, 2014 · 2 comments

Comments

@pkopac
Copy link

pkopac commented Sep 16, 2014

Hi!

Problem: "stop" doesn't work properly.
node version: v0.10.29
pm2 version: 0.10.7

Scenario:

  1. run the app from json config: pm2 start json
  2. access app from browser
  3. stop app: pm2 stop app-name
  4. try to access it in web browser again: it still runs
  5. after a while pm2 restarts the app, it gets a new PID.

This is very strange. Why doesn't pm2 kill the app? Why does it restart the app instead?

I'm also using a PID file in configuration - the file stays there, even though pm2 list tells me the app is "stopped".

Thank you for feedback!

Console output:
pkopac@x:$ pm2 stop app-name
[PM2] Stopping app-name
[PM2] Stopping process by name app-name
┌────────────┬────┬──────┬──────┬─────────┬───────────┬────────┬────────┬─────────────┐
│ App name │ id │ mode │ PID │ status │ restarted │ uptime │ memory │ watching │
├────────────┼────┼──────┼──────┼─────────┼───────────┼────────┼────────┼─────────────┤
│ app-name │ 0 │ fork │ 7376 │ stopped │ 0 │ 0 │ 0 B │ unactivated │
└────────────┴────┴──────┴──────┴─────────┴───────────┴────────┴────────┴─────────────┘
Use pm2 desc[ribe] <id> to get more details
pkopac@x:
$ pm2 list
┌────────────┬────┬──────┬──────┬─────────┬───────────┬────────┬────────┬─────────────┐
│ App name │ id │ mode │ PID │ status │ restarted │ uptime │ memory │ watching │
├────────────┼────┼──────┼──────┼─────────┼───────────┼────────┼────────┼─────────────┤
│ app-name │ 0 │ fork │ 7376 │ stopped │ 0 │ 0 │ 0 B │ unactivated │
└────────────┴────┴──────┴──────┴─────────┴───────────┴────────┴────────┴─────────────┘
Use pm2 desc[ribe] <id> to get more details
pkopac@x:~$ pm2 list
┌────────────┬────┬──────┬──────┬────────┬───────────┬────────┬─────────────┬─────────────┐
│ App name │ id │ mode │ PID │ status │ restarted │ uptime │ memory │ watching │
├────────────┼────┼──────┼──────┼────────┼───────────┼────────┼─────────────┼─────────────┤
│ app-name │ 0 │ fork │ 7398 │ online │ 1 │ 14s │ 43.020 MB │ unactivated │
└────────────┴────┴──────┴──────┴────────┴───────────┴────────┴─────────────┴─────────────┘
Use pm2 desc[ribe] <id> to get more details

@Unitech
Copy link
Owner

Unitech commented Oct 8, 2014

The development branch should have this fixed:

$ npm install git://github.com/Unitech/pm2#development

@DomeQdev
Copy link

DomeQdev commented Jul 2, 2020

I have same problem

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

3 participants