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

when does Graceful shutdown happens? #69

Open
avyas opened this issue Jul 20, 2016 · 3 comments
Open

when does Graceful shutdown happens? #69

avyas opened this issue Jul 20, 2016 · 3 comments

Comments

@avyas
Copy link

avyas commented Jul 20, 2016

I have a script which many a times exits when an error is encountered.
Have it on using forever service, Found that the service status is stopped, many a times.

is that something to do with graceful shutdown?

btw I have a node program with error, installed as a service and there I do not see the service status as stopped.

@arvind-agarwal
Copy link
Contributor

I would advise you to look at your node app code and debug why it exits. This has nothing to do with graceful shutdown, graceful shutdown only ensures that services get a chance to do cleanup on request for stopping them.

@avyas
Copy link
Author

avyas commented Jul 20, 2016

Thanks for the answer. What could be the cases when the service could stop automatically ?

I have following in the log when my service stopped last time .

.
.
.
.
.
error: restarting script because change changed
error: restarting script because change changed
error: restarting script because change changed
error: restarting script because change changed
error: Forever detected script exited with code: 143
error: Script restart attempt #1

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)

@acrawly
Copy link

acrawly commented Aug 11, 2016

Not sure if this should be asked here but how would I shutdown a service after it's installed? For example I do forever-service install my_app --script main.js. Now how do I stop and start that app manually?

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