Page MenuHomePhabricator

Rotate or truncate forrestbot logs
Closed, ResolvedPublic

Description

https://forrestbot.toolforge.org/ displayed logs are rather big. It may be a good idea to set up logrotate there to either rotate the logs each 1/2/3/etc. months, keeping the most recent activity only, or truncate them each time they reach XYZ Kbs. Posting as suggested by @Legoktm.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 8 2020, 10:43 PM

They are rotated nightly (see https://github.com/wikimedia/labs-tools-forrestbot/blob/master/wblogging.py). We do sometimes generate a lot of logs in one day, but that's just because we have a development community that does a lot of work ;-)

They are rotated nightly (see https://github.com/wikimedia/labs-tools-forrestbot/blob/master/wblogging.py). We do sometimes generate a lot of logs in one day, but that's just because we have a development community that does a lot of work ;-)

Hello. It does not seem to be the case with https://forrestbot.toolforge.org/forrestbot.err.txt I can find errors dating MW 1.32 and MW 1.35.

You're right, the .err is indeed not truncated automatically. The first messages date back to about January this year, and given the 1.5MB log file size, I think truncating by hand is probably the best approach. I just did so :-)

MarcoAurelio added a comment.EditedOct 9 2020, 9:16 PM

Thanks @valhallasw. Do you think it takes a while since the web gets updated? Because it looks #mw1.32.0-wmf.999 is still there :-)

Edit: well, now it's 404 - Not Found. As long as it gets created again when there's an error this works for me as well :-)

valhallasw closed this task as Resolved.Oct 10 2020, 10:30 AM
valhallasw claimed this task.

Yeah, I just deleted the .err file, so there was probably some cache confused. Now that the bot has run again the .err file is there again (albeit empty).