cwru-hvz-core / cwru-hvz-source

Case Western's Implementation of a Humans vs. Zombies tracking engine.
http://hvz.case.edu/
10 stars 9 forks source link

Logs grow indefinitely #55

Closed jameshochadel closed 7 years ago

jameshochadel commented 7 years ago

Production log grows without limit. Attempted to fix in commits 03e7578 and d035794, but did not succeed.

tdooner commented 7 years ago

The best fix to this is probably an operational-level one (e.g. logrotate) instead of an application one. Creating a single log file is probably a reasonable simple behavior. But if the logs are growing too quickly it might be because Rails is outputting more than necessary into them. In production, Rails should only output a single line per request. That should end up being only a few KB per game.

jameshochadel commented 7 years ago

Good point. The production log was 1.2GB when I found it, and regrettably I deleted it, so I don't know for sure what led it to take up so much space. I'll try to found out what was growing it, and look into logrotate.

jameshochadel commented 7 years ago

Added configuration to /etc/logrotate.conf; logs will rotate weekly and be removed after a month.