pm2-logrotate 好吃内存啊。
发布于 7 年前 作者 ipengyo 5610 次浏览 来自 问答
┌─────────────────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬───────────┬──────────┐
│ App name                │ id │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem       │ watching │
├─────────────────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼───────────┼──────────┤
│ xxx │ 0  │ fork │ 29556 │ online │ 9       │ 7D     │ 0%  │ 83.0 MB   │ disabled │
└─────────────────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴──────────┘
 Module activated
┌───────────────┬─────────┬────────────┬────────┬─────────┬─────┬──────────────┐
│ Module        │ version │ target PID │ status │ restart │ cpu │ memory       │
├───────────────┼─────────┼────────────┼────────┼─────────┼─────┼──────────────┤
│ pm2-logrotate │ 2.2.0   │ N/A        │ online │ 9       │ 0%  │ 274.090 MB   │
└───────────────┴─────────┴────────────┴────────┴─────────┴─────┴──────────────┘

比我的业务项目内存还吃得多。。这个正常么

7 回复

看看是持续的还是瞬间的。 感觉有可能是切分是瞬间的值。

@stonephp 基本上维持在200M 左右。。。

@ipengyo 看看能不能直接用系统的 logrotate

已经确认2.2版本的pm2 logrotate 存在内存泄漏 请各位更新。 https://github.com/keymetrics/pm2-logrotate/issues/45

觉得系统内置的logrotate比较好用

自己写个bash脚本, 加到crontab. 我们就是这么搞的.

这不都是为了省事么 少维护东西。

回到顶部