Memory Limit Reload does not log to pm2 logs
Open
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?
The PM2 'Max Memory Threshold Auto Reload' was killing an application which had exceeded the limit, but from pm2 logs there was no clear way of telling this. The application simply 'died' and restarted, without logging anything to console.
How could we reproduce this issue?
- Set the
max_memory_restartof an application to some value. - Create a Node application that exceeds that limit.
- Observe no logging takes place when the application exceeds it.
Supporting information
$ pm2 report
--- PM2 report ----------------------------------------------------------------
Date : Mon Sep 21 2020 13:39:53 GMT+0200 (Central European Summer Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 3.5.1
node version : 10.15.0
node path : not found
argv : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : codefined
uid : 1000
gid : 1000
uptime : 137815min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 3.5.1
node version : 10.15.0
node path : /usr/bin/pm2
argv : /usr/bin/node,/usr/bin/pm2,report
argv0 : node
user : codefined
uid : 1000
gid : 1000
===============================================================================
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 reproducing the issue with an application configured with max_memory_restart, then inspect the memory-threshold restart path and the output of pm2 logs. Done means that exceeding the limit produces a clear log entry explaining the automatic kill and restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100