Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


nodemon is leaving one node instance running when it exits? #185

tciuro opened this Issue · 6 comments

5 participants


Hi Remy,

I launch nodemon like this:

Mac:webserv tito$ nodemon app.js 
15 Jun 13:05:08 - [nodemon] v0.7.8
15 Jun 13:05:08 - [nodemon] to restart at any time, enter `rs`
15 Jun 13:05:08 - [nodemon] watching: /Users/tito/Desktop/Tests/webserv
15 Jun 13:05:08 - [nodemon] starting `node app.js`
Express server listening on port 8080 in development mode

I can see two instances of node showing up in Activity Monitor (Mac OS X). If I terminate nodemon via Control-C, one instance is left behind. When I fire nodemon again I get the following:

Mac:webserv tito$ nodemon app.js 
15 Jun 13:07:10 - [nodemon] v0.7.8
15 Jun 13:07:10 - [nodemon] to restart at any time, enter `rs`
15 Jun 13:07:10 - [nodemon] watching: /Users/tito/Desktop/Tests/webserv
15 Jun 13:07:10 - [nodemon] starting `node app.js`
Caught exception: Error: listen EADDRINUSE

Is this expected? Is there anything I can do to make sure nodemon kills the two processes it created when it launched?



I'm seeing the same behavior on Windows 7 with a bare bones express app when running nodemon from a Cygwin terminal. If I run from a regular windows command prompt then it works ok.


I have the same when I do (on a debian):

echo `PORT=8000 nodemon > /dev/null 2>&1 & echo $!` > /var/run/
kill -9 $(cat /var/run/

nodemon exits but node stays.
But with Ctrl+C, no problem.


@kylekatarnls by sending the 9 you're sending the SIGKILL signal, which "cannot be caught or ignored.". So nodemon has no time to clean up. You should only use SIGKILL for forceable kill processes. More appropriate is the SIGTERM or 15 to tell nodemon to shutdown.




I'm using OSX, and I'm getting this error intermittently. It seems that nodemon restarts the process a little too quickly sometimes. Maybe one out of 10+ times? It only started happening recently, but it's happening across multiple computers/projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.