Do Containers Restart without SIGTERM

I have a project that involves processing some files in the background using NodeJS. This is on a pro plan, and is “boosted”. It works well, but I am finding that sometimes the processing just quits completely for a couple minutes. I have logging, and am handling SIGTERM to quit processing gracefully. This all works, and if SIGTERM hits, it exits gracefully. But I’m still seeing it occasionally restart without SIGTERM. Looking at the logs, it’s as though someone tripped on the power cord - no SIGTERM, error, etc. Just stop then come back 2 minutes later.

Below is an example. It stops at 17:22:00.263Z and comes back at 17:24:56.098Z. Had there been a SIGTERM, it would have been logged.

Are there situations where container orchestration at glitch would stop a container with no SIGTERM? The process is pegging CPU occassionally (pupeteer launches Chromium, which pegs CPU sometimes). Does glitch have throttling that would do this? I can handle a graceful restart in my code, but want to be sure I understand the problem and know if there’s anything else I can do to prevent or minimize this. Seems to happen 2-3 times a day.

{“level”:“debug”,“message”:“Alreading processing queue.”,“timestamp”:“2021-10-07T17:21:50.261Z”}
{“level”:“debug”,“message”:“Alreading processing queue.”,“timestamp”:“2021-10-07T17:21:55.261Z”}
{“level”:“debug”,“message”:“Alreading processing queue.”,“timestamp”:“2021-10-07T17:22:00.263Z”}
{“level”:“debug”,“message”:“Processing pending queue”,“timestamp”:“2021-10-07T17:24:56.098Z”}
{“level”:“debug”,“message”:“Processing pending queue”,“timestamp”:“2021-10-07T17:25:01.121Z”}
{“level”:“debug”,“message”:“Processing pending queue”,“timestamp”:“2021-10-07T17:25:06.141Z”}

1 Like