pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

pm2-runtime process increasing memory consumption

Open alyrik opened this issue 7 years ago • 2 comments

What's going wrong?

node /usr/local/bin/pm2-runtime process.config.js --env production has an increasing memory consumption even in a stale mode (without any requests or operations).

NOTE: not a managed process but a pm2-runtime process itself causes a huge memory load which is growing approx. 5MB per minute.

Look at pid 17:

Screen Shot 2019-03-25 at 02 24 12

Nothing special about my config:

module.exports = {
  apps: [
    {
      name: 'Web app',
      script: 'src/',
      exec_mode: 'cluster',
      instances: 2,
      env: {
        NODE_ENV: 'production',
      },
    },
  ],
};

It is reproducible without clustering as well. No logs are being written in ~/.pm2/logs.

It's even stranger because there are no problems when I run it in staging environment on my staging server. They both run in identical containers based on fresh built Docker image.

Supporting information

Node: 11.12.0 Pm2: 3.4.0 OS: Debian Stretch

What can it be? And how can I debug pm2-runtime process itself?

The problem has appeared after upgrading from 3.2.0 to 3.4.0 version.

alyrik avatar Mar 25 '19 07:03 alyrik

I found it out that the collision is between PM2 and fresh Node versions — 11.11 and 11.12. There is no problem with Node 11.10.1.

@Unitech

alyrik avatar Mar 26 '19 20:03 alyrik

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 24 '20 04:05 stale[bot]