Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM2 start with next.js is too slow #5800

Open
leesb971204 opened this issue Apr 12, 2024 · 0 comments
Open

PM2 start with next.js is too slow #5800

leesb971204 opened this issue Apr 12, 2024 · 0 comments

Comments

@leesb971204
Copy link

What's going wrong?

Hi I'm running pm2 in cluster mode 8 cores and I'm using for deploy next.js app. But when I start pm2, the memory of each cluster starts at 70mb and when I request work for rendering on the web, the memory starts to grow. (request is pending)
And as soon as the memory reaches 200mb, the request is executed normally. Each request takes more than 10 seconds and takes more than a minute because eight clusters operate. Is this normal case or am I miss something?

How could we reproduce this issue?

It happens every time I start pm2.

Supporting information

--- PM2 report ----------------------------------------------------------------
Date                 : Fri Apr 12 2024 13:22:36 GMT+0900 (Korean Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.3.0
node version         : 16.4.0
node path            : /root/.nvm/versions/node/v16.4.0/bin/pm2
argv                 : /root/.nvm/versions/node/v16.4.0/bin/node,/root/.nvm/versions/node/v16.4.0/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
uptime               : 11min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.3.0
node version         : 16.4.0
node path            : /root/.nvm/versions/node/v16.4.0/bin/pm2
argv                 : /root/.nvm/versions/node/v16.4.0/bin/node,/root/.nvm/versions/node/v16.4.0/bin/pm2,report
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
cpus nb              : 4
freemem              : 362532864
totalmem             : 4109983744
home                 : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ work-app           │ cluster  │ 1    │ online    │ 0.7%     │ 160.8mb  │
│ 1  │ work-app           │ cluster  │ 1    │ online    │ 0%       │ 165.6mb  │
│ 2  │ work-app           │ cluster  │ 1    │ online    │ 0.7%     │ 164.5mb  │
│ 3  │ work-app           │ cluster  │ 1    │ online    │ 0.4%     │ 161.3mb  │
│ 4  │ work-app           │ cluster  │ 1    │ online    │ 0.4%     │ 163.7mb  │
│ 5  │ work-app           │ cluster  │ 1    │ online    │ 0.4%     │ 158.8mb  │
│ 6  │ work-app           │ cluster  │ 1    │ online    │ 0.4%     │ 164.7mb  │
│ 7  │ work-app           │ cluster  │ 1    │ online    │ 0.4%     │ 164.5mb  │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
[PM2][WARN] Current process list is not synchronized with saved list. Type 'pm2 save' to synchronize.
===============================================================================
--- Daemon logs --------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant