morph icon indicating copy to clipboard operation
morph copied to clipboard

Massive amount of files being created in /var/log/upstart/

Open henare opened this issue 9 years ago • 2 comments

We discovered this because our Linode backups started failing. The helpful Linoders pointed out that backups can fail due to a really big number of files and that we have heaps in /var/lib/docker and /var/log/upstart.

We need the ones in /var/lib/docker and a quick check of /var/log/upstart showed millions of files like /var/log/upstart/network-interface-vethedb98ab.log. That made me think Docker was responsible and it looks like we're not the only ones affected: https://github.com/docker/docker/issues/3837

Not surprisingly I couldn't remove these with rm and a wildcard (the wildcard tries to put every file as an argument to rm) so I had to use:

find /var/log/upstart/ -name "network-interface-veth*" | xargs rm

However they're already filling up again so we'll need to fix this properly.

henare avatar Apr 27 '16 07:04 henare

Summarising https://github.com/docker/docker/issues/3837, it's probably a bug in the ifupdown package which has been fixed. I don't know which version of ubuntu the fix has made it into. A workaround is to setup a logrotate on those files

mlandauer avatar Jul 04 '16 23:07 mlandauer

Would you believe I just freed 8 GB by deleting 632,284 of these files?!

henare avatar Jan 16 '17 23:01 henare