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

tmpfiles aren't cleaned up after a document is created #9

Open
walterdavis opened this issue Jul 19, 2011 · 1 comment
Open

tmpfiles aren't cleaned up after a document is created #9

walterdavis opened this issue Jul 19, 2011 · 1 comment

Comments

@walterdavis
Copy link
Contributor

I am running out of space in my /tmp directory because the tmpdir isn't cleaning up after itself (as far as I can tell). I am on a Joyent SmartMachine, and /tmp has a hard limit at 2GB. This fills up pretty quickly when looping over a big directory of documents and converting them all to epub. This didn't happen in earlier versions (0.6) but I see that you've switched to a different Zip technique.

My /tmp directory fills up with directories named like this: d20110719-28360-8srs14, each containing the un-compressed version of the final Zip/Epub document. In looking through the documentation for tmpdir, it seems that there needs to be an explicit call to remove this file if you don't pass a block to the Dir.mktmpdir call.

It's not clear to me if this is something that is being called from within your code (can't find it) or the Zip wrapper you're using. Either way, the effect is the same. I was able to get my program to run only by manually cleaning out the /tmp directory after each loop, which is very ugly and will break something else on the same machine one day.

Can you help?

@walterdavis
Copy link
Contributor Author

I've found where you call mktmpdir in easy.rb, and tested in irb on the server that the syntax you are using there is correct. A tmpfile created there is cleaned up on closure of the block. So I'm stumped why this isn't working when I use EeePub.make to build a document inside of a loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant