pm2 status "ERRORED"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
--- Daemon logs --------------------------------------------
/home/ubuntu/.pm2/pm2.log last 20 lines:
PM2 | at WriteStream.EventEmitter.emit (node:domain:548:15)
PM2 | at node:internal/fs/streams:61:16
PM2 | at FSReqCallback.oncomplete (node:fs:171:23)
PM2 | 2021-07-19T08:57:43: PM2 log: App [server:0] online
PM2 | 2021-07-19T08:57:43: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
PM2 | 2021-07-19T08:57:43: PM2 log: App [server:0] starting in -fork mode-
PM2 | 2021-07-19T08:57:43: PM2 error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (7247)
PM2 | at Object.writeFileSync (node:fs:1464:5)
PM2 | at /usr/local/lib/node_modules/pm2/lib/God/ForkMode.js:264:12
PM2 | at wrapper (/usr/local/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
PM2 | at next (/usr/local/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
PM2 | at /usr/local/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
PM2 | at WriteStream. (/usr/local/lib/node_modules/pm2/lib/Utility.js:186:13)
PM2 | at WriteStream.emit (node:events:327:20)
PM2 | at WriteStream.EventEmitter.emit (node:domain:548:15)
PM2 | at node:internal/fs/streams:61:16
PM2 | at FSReqCallback.oncomplete (node:fs:171:23)
PM2 | 2021-07-19T08:57:43: PM2 log: App [server:0] online
PM2 | 2021-07-19T08:57:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
PM2 | 2021-07-19T08:57:44: PM2 log: Script /home/ubuntu/project/server.js had too many unstable restarts (16). Stopped. "errored"
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 at lib/God/ForkMode.js:264, where the logged writeFileSync error occurs, and compare it with the daemon log showing numeric data 7247. Investigate how server.js reaches this path and determine what behavior should prevent the repeated unstable restarts and resulting ERRORED status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100