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

[BUG] Logs not rotating #535

Open
p3lim opened this issue Jan 31, 2022 · 4 comments
Open

[BUG] Logs not rotating #535

p3lim opened this issue Jan 31, 2022 · 4 comments

Comments

@p3lim
Copy link

p3lim commented Jan 31, 2022

Tag/version of Container Images
0.3.*, 0.4.*

Logs are never rotated, we had mailman/wsgi logs that exceeded 100GB in total.

This should be fairly trivial to fix, just adding policies to /etc/logrotate.d and running logrotate in a cron job.

@p3lim p3lim added the bug label Jan 31, 2022
@maxking
Copy link
Owner

maxking commented Apr 14, 2022

Containers don’t have a cron job, but we can do something about log rotation by configuring mailman-web/mailman-core or something.

@mistermatt2u
Copy link

mistermatt2u commented Mar 28, 2023

Below is a script I placed in /etc/logrotate.d/mailman to address this issue. I believe this will rotate the logs every week, by default. You would need to confirm where your logs are stored, as that may be dependent on how you have configured your containers.

#rotate logs for Mailman (Docker)
#logs are in various locations within /opt/mailman

"/opt/mailman/core/var/logs/*.log" {
postrotate
docker-compose -f /opt/mailman/docker-mailman/docker-compose.yaml restart mailman-core
endscript
}

"/opt/mailman/web/logs/*.log" {
postrotate
docker-compose -f /opt/mailman/docker-mailman/docker-compose.yaml restart mailman-web
endscript
}

@jeensg
Copy link

jeensg commented Aug 26, 2023

Are there any news on this?
Just found my logs to be quite large after 2 years ... and don't know exactly on how to proceed with @mistermatt2u s suggestion.

@yaseppochi
Copy link

I'm not familiar with the current Docker setup, so it's possible rotation is not configured. Even once it's configured, most likely
https://gitlab.com/mailman/mailman/-/issues/931
is also a problem.

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

5 participants