New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is memory leak? #53

Closed
snadn opened this Issue May 2, 2017 · 15 comments

Comments

10 participants
@snadn
Copy link

snadn commented May 2, 2017

image

@Unitech

This comment has been minimized.

Copy link
Member

Unitech commented May 2, 2017

Confirmed

@rjforbes

This comment has been minimized.

Copy link

rjforbes commented May 17, 2017

image
Also seeing here steadily growing over time.

@isaachinman

This comment has been minimized.

Copy link

isaachinman commented May 21, 2017

Also have a pm2-logrotate process consuming over 1GB of memory. Serious issue.

@Equim-chan

This comment has been minimized.

Copy link

Equim-chan commented Jun 8, 2017

Same here. And it increased the memory usage of pm2 itself too.

@isaachinman

This comment has been minimized.

Copy link

isaachinman commented Jun 9, 2017

Sorry to bump again, but how long will this sit open? Memory leaking up to 1GB makes it absolutely irresponsible to use this util in production, lest we start rotating our log rotation processes.

@checor

This comment has been minimized.

Copy link

checor commented Jun 13, 2017

My memory size is slowly increasing too currently sitting at 233 MB. I will keep an eye if it increases to big size like the other guys do.

@Kevalin

This comment has been minimized.

Copy link

Kevalin commented Jun 20, 2017

Same here. Memory is so big.
Here is my pm2 conf
== module-db ==
┌───────────────┬───────┐
│ key │ value │
├───────────────┼───────┤
│ pm2-logrotate │ true │
└───────────────┴───────┘
== pm2-logrotate ==
┌────────────────┬───────────┐
│ key │ value │
├────────────────┼───────────┤
│ max_size │ 200M │
│ compress │ false │
│ workerInterval │ 30 │
│ rotateInterval │ 0 0 * * * │
└────────────────┴───────────┘
pm2 version 2.1.6
pm2-logrotate version 2.2.0
os centos

@ipengyo

This comment has been minimized.

Copy link

ipengyo commented Jun 28, 2017

I also encountered this situation, currently hovering around 200M

@isaachinman

This comment has been minimized.

Copy link

isaachinman commented Jul 1, 2017

@Unitech What do you need from us to fix this issue?

@dcsan

This comment has been minimized.

Copy link

dcsan commented Sep 19, 2017

how else are people addressing this?
are there any other log-rotate options that play nice with pm2 ?

$ pm2 restart pm2-logrotate

@isaachinman

This comment has been minimized.

Copy link

isaachinman commented Sep 19, 2017

@dcsan How else are people addressing this?

Use docker.

@dcsan

This comment has been minimized.

Copy link

dcsan commented Sep 19, 2017

but pm2 logs will still be piling up somewhere.

@Equim-chan

This comment has been minimized.

Copy link

Equim-chan commented Sep 19, 2017

@ADumaine

This comment has been minimized.

Copy link

ADumaine commented Oct 6, 2017

Any solution to this?
I just installed log-rotate last night and after 12 hours the app that usually takes less than 200MB is up to 1.5GB.

┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────────┬──────────┬──────────┐
│ App name │ id │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem      │ user     │ watching │
├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────────┼──────────┼──────────┤
│ snserver │ 0  │ fork │ 21706 │ online │ 118     │ 12h    │ 0%  │ 1.5 GB   │ srvadmin │ disabled │
└──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────────┴──────────┴──────────┘
 Module activated
┌───────────────┬─────────┬────────────┬────────┬─────────┬─────┬─────────────┬──────────┐
│ Module        │ version │ target PID │ status │ restart │ cpu │ memory      │ user     │
├───────────────┼─────────┼────────────┼────────┼─────────┼─────┼─────────────┼──────────┤
│ pm2-logrotate │ 2.2.0   │ N/A        │ online │ 1       │ 0%  │ 30.215 MB   │ srvadmin │
└───────────────┴─────────┴────────────┴────────┴─────────┴─────┴─────────────┴──────────┘

I tried updating pm2 from 2.6.1 to 2.7.1 and restarted.
Still has an issue. App memory has tripled in 3 hours (200MB to 300MB). This is unusable. I have to uninstall it.

EDIT: Please disregard. The issue was tracked down to an update performed a couple days before that did not manifest until the same time logrotate was installed.

@dcsan

This comment has been minimized.

Copy link

dcsan commented Oct 7, 2017

you could setup a cron task to pm2 restart pm2-logrotate every hour 👯‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment