'node and docker app restarting because of SIGSEGV signal

I have an node application witch is running with docker, the problem is, my app keeps restarting with SIGSEGV error.

npm ERR! path /usr/src/app
npm ERR! command failed
npm ERR! signal SIGSEGV
npm ERR! command sh -c node app.js

The last time it worked for 24 to 26 hours but after that it restarted again. How can I solve this?

Here is my docker file and docker-compose file

Docker file

FROM node:16-alpine3.13

WORKDIR /usr/src/app

COPY package.json ./

RUN npm install

COPY . .

CMD ["npm", "start"]

docker-compose

version: '3.9'

services:
  mongodb:
    image: mongo
    container_name: mongodb
    restart: always
    environment:
      TZ: "Asia/Tehran"
      MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
      MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
    expose:
      - ${MONGO_EXPOSE_PORT}
    volumes:
      - database:/data/db

  redis:
    image: redis
    environment:
      TZ: "Asia/Tehran"

  node:
    build: ./
    container_name: node_application
    ports:
      - ${NODE_LOCAL_PORT}:${NODE_DOCKER_PORT}
    restart: always
    depends_on:
      - mongodb
    volumes:
      - node_uploads:/usr/src/app/public/uploads/
      - ${PWD}:/usr/src/app/
      - /usr/src/app/node_modules
    environment:
      TZ: "Asia/Tehran"

volumes:
  database: { }
  node_uploads: { }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source