hemerajs / hemera

🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
MIT License
806 stars 70 forks source link

when i'm kill the hemera app, but the hemera-web's port still has run. #111

Closed arden closed 7 years ago

arden commented 7 years ago

when i'm kill the hemera app, but the hemera-web's port still has run.

StarpTech commented 7 years ago

Hi @arden how do you kill the service and which versions are you using?

StarpTech commented 7 years ago

I test it with the example examples/bridges/web.js and the server is closed correctly

[2017-07-08T09:08:23.655Z] FATAL (hemera-starptech-d325f33ea8cc4ca5a74a7c148f0bbad3/19600 on starptech): process exited
    code: null
    signal: "SIGINT"
[2017-07-08T09:08:23.656Z] DEBUG (hemera-starptech-d325f33ea8cc4ca5a74a7c148f0bbad3/19600 on starptech): Http server closed!
    plugin: "hemera-web"
arden commented 7 years ago

kill -9 hemera 1.3.9

StarpTech commented 7 years ago

Which output do you get from hemera if you set logLevel to debug ?

StarpTech commented 7 years ago

After some research

If no signal is specified, the TERM signal is sent. The default action for this signal is to terminate the process. This signal should be used in preference to the KILL signal (number 9), since a process may install a handler for the TERM signal in order to perform clean-up steps before terminating in an orderly fashion. If a process does not terminate after a TERM signal has been sent, then the KILL signal may be used; be aware that the latter signal cannot be caught, and so does not give the target process the opportunity to perform any clean-up before terminating.

Please try kill without signal.