NodeJS Worker process stopping in ECS task

When running our Temporal Worker via Docker OR local, the worker successfully starts and worker stays in ‘RUNNING’ state. But when the worker is deployed as ECS task def, the worker will start and move to ‘RUNNING’ state, but roughly after 1 minute running, the worker randomly begins the shutdown process and eventually the worker state moves to ‘STOPPED’. There is no error as the ECS task continues running, it’s only the Worker process that stops.

** since we’re developing on Mac with M1 chip, the only difference in the Docker img locally vs ECS is the platform arg added to the base image -

ECS:
“FROM --platform=linux/amd64 node:18.12.1-slim>”

LOCAL:
“FROM node:18.12.1-slim>”

Temporal-SDK Version: 1.6.0
Temporal Server: Temporal Cloud

The worker listens to a default set of shutdown signals (configurable via Runtime.install() with this option).

My suspicion is that something in your env is sending one of these signals to the worker process.

In general I would recommend exiting the process after the worker run promise resolves or rejects to avoid keeping idle worker processes around.