[GH-ISSUE #160] Not shutting down via signals if usage reporting is disabled #111

Closed
opened 2026-03-03 16:04:29 +03:00 by kerem · 4 comments
Owner

Originally created by @apeteri on GitHub (Feb 11, 2019).
Original GitHub issue: https://github.com/mthenw/frontail/issues/160

Hi Maciej,

I am using release 4.5.3 with a systemd service script, and I have noticed that the service waits for the whole ~90 second grace period when stopping, before it gets killed forcefully. Systemd attempts to stop a service by sending SIGTERM to its process group by default.

It seems that the callback for usage stats reporting in stats.js is not invoked if no tracker instance exists: github.com/mthenw/frontail@205cdbf696/lib/stats.js (L57-L63)

Due to this, signals have no effect at the end of index.js: github.com/mthenw/frontail@205cdbf696/index.js (L159-L165)

Regards,
András

Originally created by @apeteri on GitHub (Feb 11, 2019). Original GitHub issue: https://github.com/mthenw/frontail/issues/160 Hi Maciej, I am using release 4.5.3 with a systemd service script, and I have noticed that the service waits for the whole ~90 second grace period when stopping, before it gets killed forcefully. Systemd attempts to stop a service by sending `SIGTERM` to its process group by default. It seems that the callback for usage stats reporting in `stats.js` is not invoked if no `tracker` instance exists: https://github.com/mthenw/frontail/blob/205cdbf6961d556e0822d70677e71226adc5dc32/lib/stats.js#L57-L63 Due to this, signals have no effect at the end of `index.js`: https://github.com/mthenw/frontail/blob/205cdbf6961d556e0822d70677e71226adc5dc32/index.js#L159-L165 Regards, András
kerem 2026-03-03 16:04:29 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@apeteri commented on GitHub (Feb 15, 2019):

Possible duplicate of #158.

<!-- gh-comment-id:464058177 --> @apeteri commented on GitHub (Feb 15, 2019): Possible duplicate of #158.
Author
Owner

@mthenw commented on GitHub (Feb 20, 2019):

Thanks for reporting. I will take a look.

<!-- gh-comment-id:465761020 --> @mthenw commented on GitHub (Feb 20, 2019): Thanks for reporting. I will take a look.
Author
Owner

@mthenw commented on GitHub (Feb 21, 2019):

I released new version v.4.5.4. Please confirm that it works now.

<!-- gh-comment-id:466190381 --> @mthenw commented on GitHub (Feb 21, 2019): I released new version v.4.5.4. Please confirm that it works now.
Author
Owner

@apeteri commented on GitHub (Mar 1, 2019):

Looks good, now the process stops immediately. Thanks! 😃

<!-- gh-comment-id:468618935 --> @apeteri commented on GitHub (Mar 1, 2019): Looks good, now the process stops immediately. Thanks! 😃
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/frontail#111
No description provided.