openaustralia / morph

Take the hassle out of web scraping
https://morph.io
GNU Affero General Public License v3.0
461 stars 74 forks source link

Worker logs not rotated #1100

Closed henare closed 7 years ago

henare commented 7 years ago

They're in /var/log/morph/ with a few others. The worker ones are ~2 GB each right now so they should be rotated.

henare commented 7 years ago

Looks like this was fixed in 1932903d.

henare commented 7 years ago

While confirming this was fixed I discovered that logrotate wasn't running due to a problem with the /var/lib/logrotate/status file:

root@li421-88:~# /usr/sbin/logrotate /etc/logrotate.conf
error: bad top line in state file /var/lib/logrotate/status
error: could not read state file, will not attempt to write into it
root@li421-88:~# 

I've seen that before on other servers :unamused: This meant that the Rails production log had blown out to 35GB(!!). I just truncated that since it would be a nightmare to rotate and we never need it.

To fix logrotate I deleted the corrupted status file and ran logrotate again with force. This has doubled the free space we have on the server :astonished: