[PM2][ERROR] Error while launching application Error: spawn ENOMEM
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
--- PM2 report ----------------------------------------------------------------
Date : Wed Jun 09 2021 05:01:23 GMT+0000 (UTC)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 4.5.1
node version : 8.15.1
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : tech
uid : 1001
gid : 1002
uptime : 154057min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 4.5.1
node version : 8.15.1
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/bin/pm2,report
argv0 : node
user : tech
uid : 1001
gid : 1002
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU @ 2.20GHz
cpus nb : 2
freemem : 1737912320
totalmem : 13660803072
home : /home/tech
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
└─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/tech/.pm2/pm2.log last 20 lines:
PM2 | at ChildProcess.spawn (internal/child_process.js:313:11)
PM2 | at exports.spawn (child_process.js:508:9)
PM2 | at /usr/lib/node_modules/pm2/lib/God/ForkMode.js:118:20
PM2 | at wrapper (/usr/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
PM2 | at next (/usr/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
PM2 | at /usr/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
PM2 | at WriteStream.<anonymous> (/usr/lib/node_modules/pm2/lib/Utility.js:186:13)
PM2 | at emitOne (events.js:116:13)
PM2 | at WriteStream.emit (events.js:211:7)
PM2 | at fs.open (fs.js:2170:10) errno: 'ENOMEM', code: 'ENOMEM', syscall: 'spawn' }
PM2 | at Object.God.logAndGenerateError (/usr/lib/node_modules/pm2/lib/God/Methods.js:34:15)
PM2 | at /usr/lib/node_modules/pm2/lib/God/ForkMode.js:120:13
PM2 | at wrapper (/usr/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
PM2 | at next (/usr/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
PM2 | at /usr/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
PM2 | at WriteStream.<anonymous> (/usr/lib/node_modules/pm2/lib/Utility.js:186:13)
PM2 | at emitOne (events.js:116:13)
PM2 | at WriteStream.emit (events.js:211:7)
PM2 | at fs.open (fs.js:2170:10)
PM2 | at FSReqWrap.oncomplete (fs.js:135:15)
what is this issue:
[PM2][ERROR] Error while launching application Error: spawn ENOMEM
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:508:9)
at /usr/lib/node_modules/pm2/lib/God/ForkMode.js:118:20
at wrapper (/usr/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
at next (/usr/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
at /usr/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
at WriteStream. (/usr/lib/node_modules/pm2/lib/Utility.js:186:13)
at emitOne (events.js:116:13)
at WriteStream.emit (events.js:211:7)
at fs.open (fs.js:2170:10)
suggest solution
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 with the PM2 report and the stack entries in lib/God/ForkMode.js and lib/Utility.js, especially around the reported spawn failure. Reproduce the launch error with the stated Node.js and PM2 versions, then determine whether the issue is actionable in PM2 or depends on the host environment. Done means a confirmed cause and a documented fix or clear reproduction requirements.
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
- 25/100