Wrong units in description for --max-memory-restart option
Open
Nobody has claimed this yet.
S: Open for PR
SYS: Daemon
T: Bug
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Expected behaviour
The --max-memory-restart option states that it expects the value in megaoctets.
From the help option:
--max-memory-restart <memory> specify max memory amount used to autorestart (in megaoctets)
Actual behaviour
The --max-memory-restart option translates the supplied value as octets.
Steps to reproduce
Start a simple script with the option --max-memory-restart 100
Observe that the process is restarted every 30 seconds
Software versions used
OS : Ubuntu 14.04.5 LTS Server x64
node.js : 6.9.1
PM2 : 2.0.19
PM2 Log output
Use the command: tail --lines 50 ~/.pm2/pm2.log
2016-11-01 21:48:00: [PM2][WORKER] Process 0 restarted because it exceeds --max-memory-restart value (current_memory=39677952 max_memory_limit=250 [octets])
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 the --max-memory-restart option's help text and the PM2 log output from the reproduction command. Verify how the supplied value is interpreted and ensure the documented megaoctet units match the runtime behavior and reported max_memory_limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100