I’ve had a bug recently when developing locally. When I start the server with nodemon, it seems that when the server hot-reloads, the old server is still running:
I see this issue when I kill the process, error logs from multiple services, and it doesn’t always terminate, I have to manually go kill the process.
I get the feeling that the db is shutting down before the services are cut off, the call to the stop method then fails.
Hmm, good point, except that it doesn’t explain why the old process isn’t killed. Normally, nodemon kills the old process and starts a new one, so even if the old process doesn’t « graceful quit », it shouldn’t stay in the background indefinitely.