How Can I reduce instances
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
It takes too much of ram
How could we reproduce this issue?
I used the command :
pm2 start -i 1 npm --name "directus_atc" -- start
Supporting information
I have installed Directus 9 on VPS machine with 1 GB ram and 1 Core CPU
I ran the directus with PM2 as in documentation
I am using NGINX as proxy server and mariadDB
I noticed that directus run on 11 pid so it takes alot of ram
pm2 -v
5.1.2
$ pm2 report
`
--- PM2 report ----------------------------------------------------------------
Date : Sun Feb 06 2022 08:53:24 GMT+0000 (Coordinated Universal Time)
--- Daemon -------------------------------------------------
pm2d version : 5.1.2
node version : 16.13.2
node path : not found
argv : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : alsherif
uid : 1000
gid : 1000
uptime : 944min
--- CLI ----------------------------------------------------
local pm2 : 5.1.2
node version : 16.13.2
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/bin/pm2,report
argv0 : node
user : alsherif
uid : 1000
gid : 1000
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : AMD EPYC 7601 32-Core Processor
cpus nb : 1
freemem : 177278976
totalmem : 1019023360
home : /home/alsherif
--- PM2 list -----------------------------------------------
┌─────┬─────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ directus_atc │ default │ N/A │ cluster │ 3670 │ 7m │ 2 │ online │ 0% │ 55.2mb │ alsherif │ disabled │
└─────┴─────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
--- Daemon logs --------------------------------------------
/home/alsherif/.pm2/pm2.log last 20 lines:
PM2 | - Column "tags": "utf8mb4_bin"
PM2 | - Column "auth_data": "utf8mb4_bin"
PM2 | - Table "directus_fields": "utf8mb4_general_ci"
PM2 | - Column "options": "utf8mb4_bin"
PM2 | - Column "display_options": "utf8mb4_bin"
PM2 | - Column "translations": "utf8mb4_bin"
PM2 | - Column "conditions": "utf8mb4_bin"
PM2 | - Table "posts": "utf8mb4_general_ci"
PM2 | - Column "seo_key_words": "utf8mb4_bin"
PM2 | - Table "directus_permissions": "utf8mb4_general_ci"
PM2 | - Column "permissions": "utf8mb4_bin"
PM2 | - Column "validation": "utf8mb4_bin"
PM2 | - Column "presets": "utf8mb4_bin"
PM2 | - Table "directus_panels": "utf8mb4_general_ci"
PM2 | - Column "options": "utf8mb4_bin"
PM2 | - Table "directus_webhooks": "utf8mb4_general_ci"
PM2 | - Column "headers": "utf8mb4_bin"
PM2 |
PM2 | 08:46:22 ✨ Server started at http://localhost:8055
PM2 | 08:51:34 ✨ request completed GET 404 /actuator/health 17ms
`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking PM2's documented behavior for pm2 start -i 1 npm --name "directus_atc" -- start and the meaning of cluster mode, then compare it with the supplied pm2 report and PM2 list output. Done means the issue clearly distinguishes PM2-managed processes from Directus or system processes and documents a reproducible way to reduce memory or explains why the reported process count is expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100