metarhia / impress

Enterprise application server for Node.js and Metarhia private cloud ⚡
https://metarhia.com
MIT License
970 stars 129 forks source link

Process ignores signals and does not stop #1968

Closed timursevimli closed 5 months ago

timursevimli commented 5 months ago

Impress and Node.js versions

Impress v3.0.0.0 and node v20.13.1

Platform

Darwin (MacOS Sonoma)

Describe the bug

The process ignores signals such as SIGINT, TERMINATE, and SIGTERM. After receiving one of these signals, an error occurs, causing it to ignore all events, including CTRL+C. The only option left is to stop the process by using the KILL signal.

To Reproduce

Launch impress process and send any one of these signals like SIGINT, TERMINATE or SIGTERM. After an error occurs, try calling CTRL + C.

Note: To exit the impress process completely, send the KILL signal.

Expected behavior

Successfully graceful shutdown

Screenshots

When using SIGINT signal for process by name of "impress", an error occurs: Screenshot 2024-05-17 at 14 56 35

After an error occurs, CTRL + C launches the "graceful shutdown" mechanism, but even this does not help to exit the process: Screenshot 2024-05-17 at 14 53 36

Note: I call CTRL + C 4 times

Additional context

No response

tshemsedinov commented 5 months ago

It works well in 3.0.15 for me

timursevimli commented 5 months ago

Instead of using CTRL+C, try passing a SIGINT signal to process, for example using htop.

CTRL+C will work because it calls process.exit(0) without sending any signal to the process like SIGINT, SIGTERM or TERMINATE