-
Notifications
You must be signed in to change notification settings - Fork 109
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
Compressed files land in /tmp #29
Comments
First thought is that intermediate temporary files are not removed as their objects are not garbage collected. Will check |
@toy I had a look at source and I think this method can called used in a block that is passed to
|
@toy I decided to set |
What do you expect to get by setting |
@toy I only want temp files not to gather somewhere and take disk space as I can't get rid of them in a more elegant way. |
Please try branch |
@toy I just had a look at it and I will test that soon and get back to you. Thank you for your effort! |
@toy testing it at the moment. I think it removes the files selectively, because total numbers of files in directory gradually grows: rszalanski@raf-macbook /tmp/image_optim $ find . -type f | wc -l [ruby-2.1.0]
find: ./list_thumbnail-2F-640x36020140205-82716-1f45lff-0.jpg.lock: No such file or directory
3544 Memory consumption also grows: Important think: at once I compress smaller chunk of images (2000 or 3000). |
I've wrote a small script to check memory consumption and temp file leakage. Using it on current master 493bba3 shows lots of still existing tempfiles before GC, but zero afterwards. But for unlink-intermediate 7ebc2db it shows zero also before GC. |
@toy Ok, I finally get reasonable numbers and |
What did you do to get to reasonable numbers? Did you change something in |
@szalansky Did you manage to test more? Can this issue be considered resolved? |
@toy I'm sorry, but I didn't get notification about your previous comment. Yes, this issue is resolved. Thank you for your effort and time. |
@szalansky Strange, probably I should always @mention person I'm writing to. Thanks for checking |
I have a strange feeling that compressed files land in /tmp directory. I realised that after one of my rake tasks had been interrupted due to lack of space on a disc.
Command I run (for a large number of images, size around 50 GB):
Is it possible to avoid such behaviour or dump files to /dev/null, or delete them during procesing?
The text was updated successfully, but these errors were encountered: