You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux 5d46ffbf9811 6.10.4-linuxkit #1 SMP Mon Aug 12 08:47:01 UTC 2024 aarch64 Linux
Subsystem
docker
What steps will reproduce the bug?
I’m using node --watch --watch-path in Docker, and it works great until after a few runs, it gets stuck and displays the message ‘Waiting for graceful termination.’
How often does it reproduce? Is there a required condition?
I’m using node --watch --watch-flag in Docker, and it works great. However, with every start, after Node refreshes the code a few times, it gets stuck and the message ‘Waiting for graceful termination.’ appears.
What is the expected behavior? Why is that the expected behavior?
With each run, when node refreshes the code several times
im having a similar issue in my computer (macos and no docker). i have this simple command infisical run --env=${INFISICAL_ENV:-dev} -- node --watch --watch-path dist --enable-source-maps dist/index.js
and after certain amount of time it says "Waiting for graceful termination..." and doesn't reflect the updates. looks like the exec having a timeout? it shouldn't timeout because it has a server running inside. (No problem in production which the server started with node --enable-source-maps index.js)
I had similar issue. I turned out, that I had a highly optimized http connection hanging and undici didn't want to close before the timeout (which was 5 min in my case) runs out. So for now I replaced httpClient.close() with process.exit(0):
Activity
avivkeller commentedon Sep 30, 2024
Are you able to reproduce outside of Docker? I can't seem to reproduce locally.
0xMIEL commentedon Sep 30, 2024
Yes, I was able to reproduce this error when I edited the http server.

geeksilva97 commentedon Oct 7, 2024
I tried to reproduce it on branch
v20.17.0but I couldn't.My env:
Darwin LM-JNVH7RPW6J 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030 arm64.I executed the following script to change the
server.jsthousands of times but I couldn't see thisWaiting for graceful terminationmessage.Command
avivkeller commentedon Oct 8, 2024
As this cannot be reproduce, I've closed this issue. If this changes, I'll adjust the issue.
muratgozel commentedon Nov 29, 2024
im having a similar issue in my computer (macos and no docker). i have this simple command
infisical run --env=${INFISICAL_ENV:-dev} -- node --watch --watch-path dist --enable-source-maps dist/index.jsand after certain amount of time it says "Waiting for graceful termination..." and doesn't reflect the updates. looks like the exec having a timeout? it shouldn't timeout because it has a server running inside. (No problem in production which the server started with
node --enable-source-maps index.js)OliverJAsh commentedon Feb 18, 2025
I'm running into a similar issue. Curiously, removing
--watchand only specifying--watch-pathfixes the issue for me. Does that work for anyone else?This might be related as well: #57124
RB-Lab commentedon Aug 30, 2025
I had similar issue. I turned out, that I had a highly optimized http connection hanging and undici didn't want to close before the timeout (which was 5 min in my case) runs out. So for now I replaced
httpClient.close()withprocess.exit(0):This probably will backfire at some point, but for now it solves the problem.