Application crashes when droplet CPU usage reaches 40%

I am using meteor version 2.7.1 and using mup to deploy to digital ocean. I bought a droplet with 8 core cpu and 16GB ram to deploy the application, but when deploying it to users, it crashes every time there are many users requesting the application. Every time it crashes, I check the cup droplet and container in docker, the cup droplet is up to 40%, the application is crashing, while the cup container in docker is 100%. Why is the cup droplet not up to 80% or 90%, why is the application crashing like this? What is the problem? Please help me solve this problem, thanks in advance :pray: .

module.exports = {
  servers: {
    one: {
      host: 'xxx.xxx.xxx.xxx',
      username: 'root',
      password: 'server-password'
    },
  },

  app: {
    // TODO: change app name and path
    name: 'app',
    path: '../',
    volumes: {
      '/data/file_uploads': '/data/file_uploads',
    },

    servers: {
      one: {},
    },

    env: {
      // TODO: Change to your app's url
      ROOT_URL: 'http://xxx.xxx.xxx.xxx',
      MONGO_URL: 'mongodb://mongodb/dbName',
      MONGO_OPLOG_URL: 'mongodb://mongodb/local',
    },

    docker: {
      image: 'zodern/meteor:root',
      prepareBundle: true,
      useBuildKit: true,
    },
    deployCheckWaitTime: 120,
    enableUploadProgressBar: true,
  },

  mongo: {
    version: '5.0.5',
    servers: {
      one: {},
    },
  },
}

Do you have the server logs by any chance?

When it crashed, I checked the container logs, but there were no errors in the container logs.

Unless you use Meteor (Node) in multithreading mode, if you have memory allocated per CPU (like in AWS), what you actually run your Meteor on is a 1 core with 2GB memory. The rest is … redundant.

In AWS, I run 2 cores with 1GB. When my app reaches ~500MB memory … booom… the application crashes. I only have the autoscaling set for CPU% and going to have to add memory as a trigger too, probably something around 35-40% (when one CPU memory that Node uses gets to ~80%).

Meteor CPU and memory scale cheaper and better horizontally. You start more 1 - 2 CPU boxes but in theory, anything over 1 CPU is a waste of money. I know … pretty hard to find 1 CPU (1 core) boxes in the clouds.

You may consider this: Running meteor with pm2 for auto recovery of your server.
Also might consider this: PM2 - Cluster Mode

I checked pm2-meteor but it is out of maintenance, never updated in the past 5 years.