Skip to content
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

Conf settings ignored, logs not rotated, generates many files #168

Open
victor-ono opened this issue Jan 19, 2021 · 1 comment
Open

Conf settings ignored, logs not rotated, generates many files #168

victor-ono opened this issue Jan 19, 2021 · 1 comment

Comments

@victor-ono
Copy link

victor-ono commented Jan 19, 2021

I'm running 6 node processes using pm2. Here are my settings:

Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 100M
$ pm2 set pm2-logrotate:retain 6
$ pm2 set pm2-logrotate:compress true
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule true

These settings are completely ignored. Current log files grow to gigabytes and at the same time a small, sometimes 0 bytes rotated compressed log file is generated every 30 seconds for every process, leading to thousands of files and "No space left on device" error. I updated everything to the latest versions, nothing helps.

-rw-rw-r-- 1 user user 1366781952 Jan 16 03:32 test-out.log

-rw-rw-r-- 1 user user   23478272 Jan 19 05:35 test-out__2021-01-19_04-06-10.log.gz
-rw-rw-r-- 1 user user   18772731 Jan 19 05:34 test-out__2021-01-19_04-06-40.log.gz
-rw-rw-r-- 1 user user   16695296 Jan 19 05:35 test-out__2021-01-19_04-07-10.log.gz
-rw-rw-r-- 1 user user   14958592 Jan 19 05:35 test-out__2021-01-19_04-07-40.log.gz
-rw-rw-r-- 1 user user   13539869 Jan 19 05:34 test-out__2021-01-19_04-08-10.log.gz
-rw-rw-r-- 1 user user   12521871 Jan 19 05:34 test-out__2021-01-19_04-08-40.log.gz
-rw-rw-r-- 1 user user   11603709 Jan 19 05:34 test-out__2021-01-19_04-09-10.log.gz
-rw-rw-r-- 1 user user   11010048 Jan 19 05:35 test-out__2021-01-19_04-09-41.log.gz
-rw-rw-r-- 1 user user   10502144 Jan 19 05:35 test-out__2021-01-19_04-10-10.log.gz
-rw-rw-r-- 1 user user   10076160 Jan 19 05:35 test-out__2021-01-19_04-10-40.log.gz
-rw-rw-r-- 1 user user    9603123 Jan 19 05:34 test-out__2021-01-19_04-11-10.log.gz
-rw-rw-r-- 1 user user    9170459 Jan 19 05:34 test-out__2021-01-19_04-11-41.log.gz
-rw-rw-r-- 1 user user    8844158 Jan 19 05:33 test-out__2021-01-19_04-12-10.log.gz
-rw-rw-r-- 1 user user    8570338 Jan 19 05:34 test-out__2021-01-19_04-12-40.log.gz
-rw-rw-r-- 1 user user    8273920 Jan 19 05:34 test-out__2021-01-19_04-13-11.log.gz
-rw-rw-r-- 1 user user    8025873 Jan 19 05:34 test-out__2021-01-19_04-13-41.log.gz
-rw-rw-r-- 1 user user    7801212 Jan 19 05:34 test-out__2021-01-19_04-14-11.log.gz
-rw-rw-r-- 1 user user    7530648 Jan 19 05:33 test-out__2021-01-19_04-14-41.log.gz
-rw-rw-r-- 1 user user    7356416 Jan 19 05:35 test-out__2021-01-19_04-15-11.log.gz
-rw-rw-r-- 1 user user    7153192 Jan 19 05:34 test-out__2021-01-19_04-15-41.log.gz
-rw-rw-r-- 1 user user    6946816 Jan 19 05:35 test-out__2021-01-19_04-16-11.log.gz
-rw-rw-r-- 1 user user    6826635 Jan 19 05:34 test-out__2021-01-19_04-16-41.log.gz
-rw-rw-r-- 1 user user    6664732 Jan 19 05:33 test-out__2021-01-19_04-17-11.log.gz
-rw-rw-r-- 1 user user    6497230 Jan 19 05:33 test-out__2021-01-19_04-17-41.log.gz
-rw-rw-r-- 1 user user    6406144 Jan 19 05:35 test-out__2021-01-19_04-18-11.log.gz
-rw-rw-r-- 1 user user    6282606 Jan 19 05:34 test-out__2021-01-19_04-18-41.log.gz
-rw-rw-r-- 1 user user    6120878 Jan 19 05:35 test-out__2021-01-19_04-19-11.log.gz
-rw-rw-r-- 1 user user    5963776 Jan 19 05:35 test-out__2021-01-19_04-19-41.log.gz
-rw-rw-r-- 1 user user    5847576 Jan 19 05:34 test-out__2021-01-19_04-20-11.log.gz
-rw-rw-r-- 1 user user    5737426 Jan 19 05:34 test-out__2021-01-19_04-20-41.log.gz
-rw-rw-r-- 1 user user    5620417 Jan 19 05:34 test-out__2021-01-19_04-21-11.log.gz
-rw-rw-r-- 1 user user    5510258 Jan 19 05:34 test-out__2021-01-19_04-21-41.log.gz
-rw-rw-r-- 1 user user    5398522 Jan 19 05:33 test-out__2021-01-19_04-22-11.log.gz
-rw-rw-r-- 1 user user    5283282 Jan 19 05:33 test-out__2021-01-19_04-22-41.log.gz
-rw-rw-r-- 1 user user    5193728 Jan 19 05:35 test-out__2021-01-19_04-23-11.log.gz
-rw-rw-r-- 1 user user    5110988 Jan 19 05:34 test-out__2021-01-19_04-23-41.log.gz
-rw-rw-r-- 1 user user    4994025 Jan 19 05:33 test-out__2021-01-19_04-24-11.log.gz
-rw-rw-r-- 1 user user    4938192 Jan 19 05:35 test-out__2021-01-19_04-24-42.log.gz
-rw-rw-r-- 1 user user    4828049 Jan 19 05:34 test-out__2021-01-19_04-25-11.log.gz
-rw-rw-r-- 1 user user    4734976 Jan 19 05:35 test-out__2021-01-19_04-25-41.log.gz
-rw-rw-r-- 1 user user    4658484 Jan 19 05:33 test-out__2021-01-19_04-26-13.log.gz
-rw-rw-r-- 1 user user    4601885 Jan 19 05:34 test-out__2021-01-19_04-26-41.log.gz
-rw-rw-r-- 1 user user    4491326 Jan 19 05:34 test-out__2021-01-19_04-27-11.log.gz
-rw-rw-r-- 1 user user    4390912 Jan 19 05:35 test-out__2021-01-19_04-27-41.log.gz
-rw-rw-r-- 1 user user    4269734 Jan 19 05:33 test-out__2021-01-19_04-28-11.log.gz
-rw-rw-r-- 1 user user    4213711 Jan 19 05:34 test-out__2021-01-19_04-28-41.log.gz
-rw-rw-r-- 1 user user    4153322 Jan 19 05:34 test-out__2021-01-19_04-29-12.log.gz
-rw-rw-r-- 1 user user    4046848 Jan 19 05:35 test-out__2021-01-19_04-29-41.log.gz
-rw-rw-r-- 1 user user    3979573 Jan 19 05:33 test-out__2021-01-19_04-30-11.log.gz
-rw-rw-r-- 1 user user    3948544 Jan 19 05:35 test-out__2021-01-19_04-30-42.log.gz
-rw-rw-r-- 1 user user    3864603 Jan 19 05:33 test-out__2021-01-19_04-31-12.log.gz
-rw-rw-r-- 1 user user    3864603 Jan 19 05:34 test-out__2021-01-19_04-31-42.log.gz
-rw-rw-r-- 1 user user    3805044 Jan 19 05:33 test-out__2021-01-19_04-32-13.log.gz
-rw-rw-r-- 1 user user    3748714 Jan 19 05:33 test-out__2021-01-19_04-32-42.log.gz
-rw-rw-r-- 1 user user    3689383 Jan 19 05:32 test-out__2021-01-19_04-33-12.log.gz
-rw-rw-r-- 1 user user    3689383 Jan 19 05:34 test-out__2021-01-19_04-33-42.log.gz
-rw-rw-r-- 1 user user    3635399 Jan 19 05:34 test-out__2021-01-19_04-34-15.log.gz
-rw-rw-r-- 1 user user    3580812 Jan 19 05:34 test-out__2021-01-19_04-34-43.log.gz
-rw-rw-r-- 1 user user    3473261 Jan 19 05:33 test-out__2021-01-19_04-35-12.log.gz
-rw-rw-r-- 1 user user    3418635 Jan 19 05:34 test-out__2021-01-19_04-35-43.log.gz
-rw-rw-r-- 1 user user    3365341 Jan 19 05:34 test-out__2021-01-19_04-36-12.log.gz
-rw-rw-r-- 1 user user    3311308 Jan 19 05:35 test-out__2021-01-19_04-36-43.log.gz
-rw-rw-r-- 1 user user    3227648 Jan 19 05:35 test-out__2021-01-19_04-37-12.log.gz
-rw-rw-r-- 1 user user    3150089 Jan 19 05:34 test-out__2021-01-19_04-37-42.log.gz
-rw-rw-r-- 1 user user    3093078 Jan 19 05:33 test-out__2021-01-19_04-38-12.log.gz
-rw-rw-r-- 1 user user    3047424 Jan 19 05:35 test-out__2021-01-19_04-38-42.log.gz
-rw-rw-r-- 1 user user    3034456 Jan 19 05:34 test-out__2021-01-19_04-39-13.log.gz
-rw-rw-r-- 1 user user    2976814 Jan 19 05:34 test-out__2021-01-19_04-39-42.log.gz
-rw-rw-r-- 1 user user    2917416 Jan 19 05:33 test-out__2021-01-19_04-40-13.log.gz
-rw-rw-r-- 1 user user    2917416 Jan 19 05:34 test-out__2021-01-19_04-40-42.log.gz
-rw-rw-r-- 1 user user    2858685 Jan 19 05:33 test-out__2021-01-19_04-41-13.log.gz
-rw-rw-r-- 1 user user    2858685 Jan 19 05:34 test-out__2021-01-19_04-41-43.log.gz
-rw-rw-r-- 1 user user    2802209 Jan 19 05:34 test-out__2021-01-19_04-42-13.log.gz
-rw-rw-r-- 1 user user    2748452 Jan 19 05:34 test-out__2021-01-19_04-42-43.log.gz
-rw-rw-r-- 1 user user    2695042 Jan 19 05:34 test-out__2021-01-19_04-43-12.log.gz
-rw-rw-r-- 1 user user    2640863 Jan 19 05:34 test-out__2021-01-19_04-43-43.log.gz
-rw-rw-r-- 1 user user    2584485 Jan 19 05:34 test-out__2021-01-19_04-44-13.log.gz
-rw-rw-r-- 1 user user    2527974 Jan 19 05:34 test-out__2021-01-19_04-44-43.log.gz
-rw-rw-r-- 1 user user    2474216 Jan 19 05:34 test-out__2021-01-19_04-45-13.log.gz
-rw-rw-r-- 1 user user    2420778 Jan 19 05:33 test-out__2021-01-19_04-45-43.log.gz
-rw-rw-r-- 1 user user    2408448 Jan 19 05:35 test-out__2021-01-19_04-46-13.log.gz
-rw-rw-r-- 1 user user    2366076 Jan 19 05:34 test-out__2021-01-19_04-46-44.log.gz
-rw-rw-r-- 1 user user    2309294 Jan 19 05:33 test-out__2021-01-19_04-47-12.log.gz
-rw-rw-r-- 1 user user    2277376 Jan 19 05:35 test-out__2021-01-19_04-47-43.log.gz
-rw-rw-r-- 1 user user    2248687 Jan 19 05:33 test-out__2021-01-19_04-48-13.log.gz
-rw-rw-r-- 1 user user    2211840 Jan 19 05:35 test-out__2021-01-19_04-48-43.log.gz
-rw-rw-r-- 1 user user    2186944 Jan 19 05:33 test-out__2021-01-19_04-49-13.log.gz
-rw-rw-r-- 1 user user    2186944 Jan 19 05:34 test-out__2021-01-19_04-49-43.log.gz
-rw-rw-r-- 1 user user    2126242 Jan 19 05:32 test-out__2021-01-19_04-50-16.log.gz
-rw-rw-r-- 1 user user    2126242 Jan 19 05:33 test-out__2021-01-19_04-50-44.log.gz
-rw-rw-r-- 1 user user    2126242 Jan 19 05:34 test-out__2021-01-19_04-51-15.log.gz
-rw-rw-r-- 1 user user    2080768 Jan 19 05:35 test-out__2021-01-19_04-51-45.log.gz
-rw-rw-r-- 1 user user    2066683 Jan 19 05:33 test-out__2021-01-19_04-52-15.log.gz
-rw-rw-r-- 1 user user    2066683 Jan 19 05:34 test-out__2021-01-19_04-52-43.log.gz
-rw-rw-r-- 1 user user    2010028 Jan 19 05:34 test-out__2021-01-19_04-53-14.log.gz
-rw-rw-r-- 1 user user    2010028 Jan 19 05:34 test-out__2021-01-19_04-53-44.log.gz
-rw-rw-r-- 1 user user    1951310 Jan 19 05:33 test-out__2021-01-19_04-54-13.log.gz
-rw-rw-r-- 1 user user    1951310 Jan 19 05:34 test-out__2021-01-19_04-54-44.log.gz
-rw-rw-r-- 1 user user    1891730 Jan 19 05:33 test-out__2021-01-19_04-55-14.log.gz
-rw-rw-r-- 1 user user    1891730 Jan 19 05:34 test-out__2021-01-19_04-55-45.log.gz
-rw-rw-r-- 1 user user    1884160 Jan 19 05:35 test-out__2021-01-19_04-56-14.log.gz
-rw-rw-r-- 1 user user    1834317 Jan 19 05:34 test-out__2021-01-19_04-56-44.log.gz
-rw-rw-r-- 1 user user    1834317 Jan 19 05:34 test-out__2021-01-19_04-57-17.log.gz
-rw-rw-r-- 1 user user    1780592 Jan 19 05:34 test-out__2021-01-19_04-57-46.log.gz
-rw-rw-r-- 1 user user    1726973 Jan 19 05:33 test-out__2021-01-19_04-58-13.log.gz
-rw-rw-r-- 1 user user    1726973 Jan 19 05:34 test-out__2021-01-19_04-58-43.log.gz
-rw-rw-r-- 1 user user    1672472 Jan 19 05:34 test-out__2021-01-19_04-59-14.log.gz
-rw-rw-r-- 1 user user    1622016 Jan 19 05:35 test-out__2021-01-19_04-59-45.log.gz
-rw-rw-r-- 1 user user    1617193 Jan 19 05:34 test-out__2021-01-19_05-00-14.log.gz
-rw-rw-r-- 1 user user    1563891 Jan 19 05:33 test-out__2021-01-19_05-00-44.log.gz
-rw-rw-r-- 1 user user    1563891 Jan 19 05:34 test-out__2021-01-19_05-01-15.log.gz
-rw-rw-r-- 1 user user    1507011 Jan 19 05:33 test-out__2021-01-19_05-01-45.log.gz
-rw-rw-r-- 1 user user    1507011 Jan 19 05:34 test-out__2021-01-19_05-02-14.log.gz
-rw-rw-r-- 1 user user    1490944 Jan 19 05:35 test-out__2021-01-19_05-02-45.log.gz
-rw-rw-r-- 1 user user    1452058 Jan 19 05:34 test-out__2021-01-19_05-03-14.log.gz
-rw-rw-r-- 1 user user    1409024 Jan 19 05:35 test-out__2021-01-19_05-03-45.log.gz
-rw-rw-r-- 1 user user    1397941 Jan 19 05:34 test-out__2021-01-19_05-04-14.log.gz
-rw-rw-r-- 1 user user    1343219 Jan 19 05:34 test-out__2021-01-19_05-04-44.log.gz
-rw-rw-r-- 1 user user    1327104 Jan 19 05:35 test-out__2021-01-19_05-05-14.log.gz
-rw-rw-r-- 1 user user    1288453 Jan 19 05:34 test-out__2021-01-19_05-05-44.log.gz
-rw-rw-r-- 1 user user    1233413 Jan 19 05:34 test-out__2021-01-19_05-06-14.log.gz
-rw-rw-r-- 1 user user    1177689 Jan 19 05:33 test-out__2021-01-19_05-06-45.log.gz
-rw-rw-r-- 1 user user    1177689 Jan 19 05:34 test-out__2021-01-19_05-07-14.log.gz
-rw-rw-r-- 1 user user    1120208 Jan 19 05:33 test-out__2021-01-19_05-07-44.log.gz
-rw-rw-r-- 1 user user    1120208 Jan 19 05:34 test-out__2021-01-19_05-08-14.log.gz
-rw-rw-r-- 1 user user    1064623 Jan 19 05:33 test-out__2021-01-19_05-08-44.log.gz
-rw-rw-r-- 1 user user    1064623 Jan 19 05:34 test-out__2021-01-19_05-09-15.log.gz
-rw-rw-r-- 1 user user    1008015 Jan 19 05:33 test-out__2021-01-19_05-09-46.log.gz
-rw-rw-r-- 1 user user    1008015 Jan 19 05:34 test-out__2021-01-19_05-10-14.log.gz
-rw-rw-r-- 1 user user     951877 Jan 19 05:33 test-out__2021-01-19_05-10-45.log.gz
-rw-rw-r-- 1 user user     951877 Jan 19 05:34 test-out__2021-01-19_05-11-16.log.gz
-rw-rw-r-- 1 user user     950272 Jan 19 05:35 test-out__2021-01-19_05-11-45.log.gz
-rw-rw-r-- 1 user user     893375 Jan 19 05:33 test-out__2021-01-19_05-12-15.log.gz
-rw-rw-r-- 1 user user     893375 Jan 19 05:34 test-out__2021-01-19_05-12-45.log.gz
-rw-rw-r-- 1 user user     868352 Jan 19 05:35 test-out__2021-01-19_05-13-15.log.gz
-rw-rw-r-- 1 user user     836644 Jan 19 05:34 test-out__2021-01-19_05-13-45.log.gz
-rw-rw-r-- 1 user user     819200 Jan 19 05:35 test-out__2021-01-19_05-14-14.log.gz
-rw-rw-r-- 1 user user     778885 Jan 19 05:34 test-out__2021-01-19_05-14-45.log.gz
-rw-rw-r-- 1 user user     778885 Jan 19 05:34 test-out__2021-01-19_05-15-14.log.gz
-rw-rw-r-- 1 user user     722776 Jan 19 05:33 test-out__2021-01-19_05-15-46.log.gz
-rw-rw-r-- 1 user user     722776 Jan 19 05:34 test-out__2021-01-19_05-16-15.log.gz
-rw-rw-r-- 1 user user     667116 Jan 19 05:33 test-out__2021-01-19_05-16-46.log.gz
-rw-rw-r-- 1 user user     667116 Jan 19 05:34 test-out__2021-01-19_05-17-15.log.gz
-rw-rw-r-- 1 user user     622592 Jan 19 05:35 test-out__2021-01-19_05-17-45.log.gz
-rw-rw-r-- 1 user user     611658 Jan 19 05:34 test-out__2021-01-19_05-18-17.log.gz
-rw-rw-r-- 1 user user     611658 Jan 19 05:34 test-out__2021-01-19_05-18-46.log.gz
-rw-rw-r-- 1 user user     556091 Jan 19 05:33 test-out__2021-01-19_05-19-16.log.gz
-rw-rw-r-- 1 user user     556091 Jan 19 05:34 test-out__2021-01-19_05-19-45.log.gz
-rw-rw-r-- 1 user user     524288 Jan 19 05:35 test-out__2021-01-19_05-20-15.log.gz
-rw-rw-r-- 1 user user     500318 Jan 19 05:34 test-out__2021-01-19_05-20-45.log.gz
-rw-rw-r-- 1 user user     500318 Jan 19 05:34 test-out__2021-01-19_05-21-15.log.gz
-rw-rw-r-- 1 user user     444416 Jan 19 05:33 test-out__2021-01-19_05-21-47.log.gz
-rw-rw-r-- 1 user user     444416 Jan 19 05:34 test-out__2021-01-19_05-22-15.log.gz
-rw-rw-r-- 1 user user     393216 Jan 19 05:35 test-out__2021-01-19_05-22-45.log.gz
-rw-rw-r-- 1 user user     387754 Jan 19 05:34 test-out__2021-01-19_05-23-18.log.gz
-rw-rw-r-- 1 user user     387754 Jan 19 05:34 test-out__2021-01-19_05-23-48.log.gz
-rw-rw-r-- 1 user user     344064 Jan 19 05:35 test-out__2021-01-19_05-24-22.log.gz
-rw-rw-r-- 1 user user     334932 Jan 19 05:34 test-out__2021-01-19_05-24-48.log.gz
-rw-rw-r-- 1 user user     334932 Jan 19 05:34 test-out__2021-01-19_05-25-20.log.gz
-rw-rw-r-- 1 user user     311296 Jan 19 05:35 test-out__2021-01-19_05-25-46.log.gz
-rw-rw-r-- 1 user user     279917 Jan 19 05:34 test-out__2021-01-19_05-26-15.log.gz
-rw-rw-r-- 1 user user     279917 Jan 19 05:34 test-out__2021-01-19_05-26-48.log.gz
-rw-rw-r-- 1 user user     245760 Jan 19 05:35 test-out__2021-01-19_05-27-17.log.gz
-rw-rw-r-- 1 user user     223638 Jan 19 05:34 test-out__2021-01-19_05-27-46.log.gz
-rw-rw-r-- 1 user user     223638 Jan 19 05:34 test-out__2021-01-19_05-28-17.log.gz
-rw-rw-r-- 1 user user     180224 Jan 19 05:35 test-out__2021-01-19_05-28-50.log.gz
-rw-rw-r-- 1 user user     168446 Jan 19 05:34 test-out__2021-01-19_05-29-16.log.gz
-rw-rw-r-- 1 user user     168446 Jan 19 05:34 test-out__2021-01-19_05-29-47.log.gz
-rw-rw-r-- 1 user user     110713 Jan 19 05:33 test-out__2021-01-19_05-30-16.log.gz
-rw-rw-r-- 1 user user     110713 Jan 19 05:33 test-out__2021-01-19_05-30-46.log.gz
-rw-rw-r-- 1 user user     110713 Jan 19 05:34 test-out__2021-01-19_05-31-17.log.gz
-rw-rw-r-- 1 user user      81920 Jan 19 05:35 test-out__2021-01-19_05-31-46.log.gz
-rw-rw-r-- 1 user user      56430 Jan 19 05:34 test-out__2021-01-19_05-32-18.log.gz
-rw-rw-r-- 1 user user      56430 Jan 19 05:34 test-out__2021-01-19_05-32-46.log.gz
-rw-rw-r-- 1 user user         10 Jan 19 05:33 test-out__2021-01-19_05-33-17.log.gz
-rw-rw-r-- 1 user user         10 Jan 19 05:34 test-out__2021-01-19_05-33-51.log.gz
-rw-rw-r-- 1 user user         10 Jan 19 05:34 test-out__2021-01-19_05-34-17.log.gz
-rw-rw-r-- 1 user user          0 Jan 19 05:34 test-out__2021-01-19_05-34-49.log.gz
@victor-ono
Copy link
Author

victor-ono commented Jan 20, 2021

I noticed that even after I stop the node processes in pm2 using pm2 stop process log.gz files continue to be generated every 30 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant