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

stopAll does not complete execution when child spinning #791

Open
semblano opened this issue Dec 29, 2015 · 3 comments
Open

stopAll does not complete execution when child spinning #791

semblano opened this issue Dec 29, 2015 · 3 comments

Comments

@semblano
Copy link

When a child script is spinning and you issue the command forever stopall, it kills the child process but not the forever one.

How To reproduce

Take this basic script that will 'fail' at startup, and will begin spinning.

test.js
throw new Error("Some error");
Start it using forever
$ forever --pidFile /path/to/test.pid -a -l /var/log/test.log --minUptime 5000 --spinSleepTime 2000 start -d /path/to/test.js

Wait a couple of seconds for it to start spinning.

Stop it using the stopall command:
$ forever stopall

At this time, the stop command does not return (does not complete it's execution), and no more info is added to the logs:

Log Content
/path/to/test.js:1
(function (exports, require, module, __filename, __dirname) { throw new Error("Some error");
                                                              ^

Error: Some error
    at Object.<anonymous> (/path/to/test.js:1:69)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:136:18)
    at node.js:972:3
error: Forever detected script exited with code: 1
error: Script restart attempt #4
/path/to/test.js:1
(function (exports, require, module, __filename, __dirname) { throw new Error("Some error");
                                                              ^

Error: Some error
    at Object.<anonymous> (/tmp/semblano/test.js:1:69)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:136:18)
    at node.js:972:3
error: Forever detected script exited with code: 1

And the forever process is still running:

24033 ?        Ssl    0:00 /opt/node-v5.0.0-linux-x64/bin/node /path/to/forever/bin/monitor /path/to/test.js
@pamelazagatti
Copy link

+1

2 similar comments
@renatotrev
Copy link

+1

@bcandido
Copy link

bcandido commented Feb 1, 2016

+1

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

4 participants