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

delay between stop and start on restart #1602

Closed
Darkein opened this issue Sep 4, 2019 · 4 comments
Closed

delay between stop and start on restart #1602

Darkein opened this issue Sep 4, 2019 · 4 comments
Labels
stale no activity for 2 weeks

Comments

@Darkein
Copy link

Darkein commented Sep 4, 2019

  • nodemon -v: 1.19.2
  • node -v: 10.16.3
  • Operating system/terminal environment: ubuntu 19.04
  • Using Docker? What image: nop
  • Command you ran: node --inspect=9002 --signal SIGTERM -r ts-node/register -r tsconfig-paths/register src/main.ts

Expected behaviour

when I restart my application using rs or by editing a file, I want to gracefully stop my application then restart it

Actual behaviour

when I tap rs the application start before the previous one stop. I have to stop it with CTRL+C, then restart it.

rs
[nodemon] starting `node --inspect=9002 -r ts-node/register -r tsconfig-paths/register src/main.ts`
Starting inspector on 127.0.0.1:9002 failed: address already in use
[nodemon] app crashed - waiting for file changes before starting...

Steps to reproduce

start an app which take some time to gracefully stop, then tap rs

I don't know if it's possible to catch when the app is completely stopped before restarting it, but if not adding a configurable delay between the stop and the start should be enough

@remy
Copy link
Owner

remy commented Sep 5, 2019

Can you try with the --spawn nodemon option fist?

@Darkein
Copy link
Author

Darkein commented Sep 6, 2019

By updating to 1.19.2 the problem is less often but I still have it. Adding "spawn":true in nodemon.json didn't fix the problem.

@Darkein Darkein closed this as completed Sep 6, 2019
@Darkein Darkein reopened this Sep 6, 2019
@Darkein
Copy link
Author

Darkein commented Sep 6, 2019

after some tests, I never have the problem if I remove --inspect.
It's certainly related to #1476, except it's not in a docker environement

@stale
Copy link

stale bot commented Sep 20, 2019

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Sep 20, 2019
@stale stale bot closed this as completed Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity for 2 weeks
Projects
None yet
Development

No branches or pull requests

2 participants