question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zippedArchive will make bugs when application runs in multiple processes

See original GitHub issue

if use the process manage tool like pm2, to control your app, the zippedArchive will lead to bug, because multiple processes will try to zip the log file,

the source code:

          this.logStream.on('rotate', function (oldFile) {
               var gzip = zlib.createGzip();
               var inp = fs.createReadStream(oldFile);
                var out = fs.createWriteStream(oldFile + '.gz');
                inp.pipe(gzip).pipe(out).on('finish', function () {
                    fs.unlinkSync(oldFile);
                });
            });
        }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mehdibeldjilalicommented, Oct 3, 2018

I have the same problem 👍 It’s possible to fix it in a new version please ? An error listener on fs.createReadStream is missing. Actually, it generate an uncaught exception 😞

0reactions
mattberthercommented, Oct 25, 2018

Merged #185 and pushed to npm as winston-daily-rotate-file@3.3.4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cost-Effective and Money-Wasting Bed Bug Control Methods
This information will help you combat bed bugs safely and effectively. What Works. Reduce clutter or put items in plastic boxes; Encase mattress...
Read more >
FORENSIC ENTOMOLOGY : THE USE OF INSECTS
The two main insect groups on bodies are flies (Diptera) and beetles (Coleoptera). Both types of insect look very different at different stages...
Read more >
Software bug - Wikipedia
A software bug is an error, flaw or fault ; Bugs in software can arise from mistakes and errors made in interpreting and...
Read more >
When Treatments Don't Work | US EPA
There can be many reasons for failure of a pesticide treatment to completely control the bed bugs, including: Not finding all the bed...
Read more >
Do Not Disturb - Objective-See
The first time the application is installed, a 'welcome' screen will be displayed. Clicking thru this will allow you to link DND with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found