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

Continuously written log files corrupted using compression option #51

Open
struanb opened this issue Apr 5, 2017 · 0 comments
Open

Comments

@struanb
Copy link

struanb commented Apr 5, 2017

Having tried the compression option, we have had to disable it and implement separate gzipping logic.

Our log files are continuously written to, which meant the gzipped file was continuously written to as pm2-logrotate compression is implemented using pipes.

The current implementation seems broken, since when log files were renamed the resulting gzip files were truncated mid-gzip-stream. gunzipping them resulted in errors, and log files with truncated final lines.

A better implementation could be to write uncompressed logs, and gzip completed log files after their rotation.

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

No branches or pull requests

2 participants