Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Nodemon Fails to Wait for Process Exit when using Docker + Inspector #1476

Closed
Labels
@darkobits

Description

@darkobits

Created per@remy's request inthis issue.

It seems that when restarting a process, Nodemon isn't waiting for the old process to completely exit before starting a new one, but:

  • only when in a Docker container and
  • only when the inspector/debug mode is active.

This issue can be intermittent in applications without a shutdown handler. But, having an application that implements a listener for Nodemon'sSIGUSR2 signal that takes even a second or so to complete can be enough to cause this issue to happen reliably.

The presence of--inspectdoes cause the new process to immediately crash because its trying to open a debug server on the same port that is still in use by the previous process' debug server, but this merely a side-effect of this issue.

If running Nodemon in a Docker container without--inspect, Nodemon correctly waits for the old process to exit, but when--inspect is used inside the container, Nodemondoes not wait for the process to exit, leading to an immediate crash.

This can be reproduced with Nodemon1.18.7 and the following:

$ node -vv10.13.0$ docker -vDocker version 18.09.0, build 4d60db4$ docker-compose -vdocker-compose version 1.23.1, build b02f1306

Here is a repo that replicates this issue:https://github.com/darkobits/nodemon-restart-issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp