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

logs fill up disk #866

Closed
anarcat opened this issue Mar 6, 2015 · 5 comments
Closed

logs fill up disk #866

anarcat opened this issue Mar 6, 2015 · 5 comments
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) topic/repo Topic repo

Comments

@anarcat
Copy link
Contributor

anarcat commented Mar 6, 2015

so I imported a 3.2GB file into ipfs using ipfs add. apparently, that's an exotic enough operation to cause all sorts of problems. :) first it duplicated the file to ~/.go-ipfs (to be expected?) and took around an hour (i was surprised by that) - but I guess that's a separate issue.

then i tried to share the file with a friend. it didn't work so well, things stalled and wouldn't work. so i went around to try to ipfs cat > /dev/null the file locally. what happened next was that my HDD was filled up with the daemon's logfiles. removing the files of course didn't help until i restarted the daemon, and then i was able to complete the ipfs cat.

@jbenet
Copy link
Member

jbenet commented Mar 7, 2015

first it duplicated the file to ~/.go-ipfs (to be expected?)

Yep.

took around an hour (i was surprised by that) - but I guess that's a separate issue.

that's abysmal perf-- something very weird is going on. what are the resources you're running this under?
are you behind a NAT? was your friend?

filled up with the daemon's logfiles

We chatted on irc and your log files do look like this:

> ipfs config Log
{
  "MaxAgeDays": 0,
  "MaxBackups": 1,
  "MaxSizeMB": 250
}

Which means that the log-rotator ipfs uses is bypassing the check entirely. I've seen this happen before in some ubuntu machines, but not all... it's a very odd bug. @whyrusleeping does it happen to you in arch? it's never happened to me on osx.

removing the files of course didn't help until i restarted the daemon

it should--

rm ~/.go-ipfs/logs/events-*

should work nicely.

@anarcat
Copy link
Contributor Author

anarcat commented Mar 7, 2015

i am behind NAT, not sure about my friend, but at this point it doesn't matter: i'm just doing ipfs add, so my friend is not involved, right?

this is on Debian Jessie AMD64.

rm ~/.go-ipfs/logs/events-*

... "works" (ie. the files are gone), but since the daemon is still running and still holds the file descriptors open, the space isn't reclaimed.

@jbenet
Copy link
Member

jbenet commented Mar 7, 2015

but since the daemon is still running and still holds the file descriptors open, the space isn't reclaimed.

no, it should close the events-<date> files-- only hangs on to the latest (no date). It works on the machines i've tested-- is it not reclaiming for you? maybe you found a bug

@anarcat
Copy link
Contributor Author

anarcat commented Mar 7, 2015

well, right. at least i think that's right: the events-* files are probably closed. but the events.log file is already huge, so that doesn't matter. :)

@whyrusleeping whyrusleeping added the kind/bug A bug in existing code (including security flaws) label Mar 7, 2015
@jbenet jbenet modified the milestone: Flat Repo and More Mar 29, 2015
@whyrusleeping
Copy link
Member

fixed in #1382

@RichardLitt RichardLitt added the exp/novice Someone with a little familiarity can pick up label Feb 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) topic/repo Topic repo
Projects
None yet
Development

No branches or pull requests

4 participants