Unitech / Unitech/pm2

Agent seems down every night

Open
#5,129 1 comment 0 reactions 0 assignees View on GitHub

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?

Since I moved to a new VPS every night at 3:05AM I getting email "Agent seems down".
The apps still working, no errors in the logs.
In app.pm2.io I see try to connect but without success only after link it again it's back to work.

Am I missing something?

--- PM2 report ----------------------------------------------------------------
Date                 : Sun Jul 25 2021 03:17:03 GMT+0000 (Coordinated Universal Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.1.0
node version         : 14.17.2
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : USER
uid                  : 1000
gid                  : 1000
uptime               : 12min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.1.0
node version         : 14.17.2
node path            : /usr/bin/pm2
argv                 : /usr/bin/node,/usr/bin/pm2,report
argv0                : node
user                 : USER
uid                  : 1000
gid                  : 1000
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : Intel Core Processor (Haswell, no TSX, IBRS)
cpus nb              : 6
freemem              : 1499160576
totalmem             : 6249259008
home                 : /home/USER
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name      │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
└─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/USER/.pm2/pm2.log last 20 lines:
PM2        | 2021-07-25T03:04:46: PM2 log: Concurrent actions   : 2
PM2        | 2021-07-25T03:04:46: PM2 log: SIGTERM timeout      : 1600
PM2        | 2021-07-25T03:04:46: PM2 log: ===============================================================================
PM2        | 2021-07-25T03:04:46: PM2 log: PM2 successfully stopped
PM2        | 2021-07-25T03:04:46: PM2 log: ===============================================================================
PM2        | 2021-07-25T03:04:46: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2        | 2021-07-25T03:04:46: PM2 log: Time                 : Sun Jul 25 2021 03:04:46 GMT+0000 (Coordinated Universal Time)
PM2        | 2021-07-25T03:04:46: PM2 log: PM2 version          : 5.1.0
PM2        | 2021-07-25T03:04:46: PM2 log: Node.js version      : 14.17.2
PM2        | 2021-07-25T03:04:46: PM2 log: Current arch         : x64
PM2        | 2021-07-25T03:04:46: PM2 log: PM2 home             : /home/USER/.pm2
PM2        | 2021-07-25T03:04:46: PM2 log: PM2 PID file         : /home/USER/.pm2/pm2.pid
PM2        | 2021-07-25T03:04:46: PM2 log: RPC socket file      : /home/USER/.pm2/rpc.sock
PM2        | 2021-07-25T03:04:46: PM2 log: BUS socket file      : /home/USER/.pm2/pub.sock
PM2        | 2021-07-25T03:04:46: PM2 log: Application log path : /home/USER/.pm2/logs
PM2        | 2021-07-25T03:04:46: PM2 log: Worker Interval      : 30000
PM2        | 2021-07-25T03:04:46: PM2 log: Process dump file    : /home/USER/.pm2/dump.pm2
PM2        | 2021-07-25T03:04:46: PM2 log: Concurrent actions   : 2
PM2        | 2021-07-25T03:04:46: PM2 log: SIGTERM timeout      : 1600
PM2        | 2021-07-25T03:04:46: PM2 log: ===============================================================================

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported PM2 daemon log around 03:05, where PM2 stops and immediately starts again, and compare that event with the nightly "Agent seems down" notification. Investigate the VPS environment and PM2 connection behavior using the supplied report. Done means identifying the cause of the nightly disconnect and confirming that the agent remains connected without relinking.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.