-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add log rotation for internal services to prevent out of disk issues #151
Comments
Ouch! Thanks @jbeemster, scheduling into next milestone. Let's go with truncation. |
This can be achieved with logrotate - the following script would set this up for all of the Snowplow apps to keep only 3 hours worth of logs:
|
@oguzhanunlu the above is not tested fully so please do make sure it functions as expected before locking it in. When I tried to make it work it had some weird side affects like the logs not working properly after rotation so would be good to test it thoroughly! |
Sure @jbeemster , thanks for the warning! |
As an update to this - the approach I took to fix this was much less elegant - it essentially involves tailing the log file to a temporary log file with a certain number of lines and then doing an in-place overwrite. Neither of these will be necessary as soon as everything is Dockerised though! |
I'll start |
The NSQ Daemon logs very aggressively which can consume many gigabytes of storage and prevent heavy use of a Snowplow Mini server.
These logs should be truncated or rotated regularly to prevent these issues.
After just 2 weeks of running a server 5.5G of logs were present in just the following file:
cc/ @alexanderdean
The text was updated successfully, but these errors were encountered: