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

Temporary files are not removed from cache #89

Closed
dan-cristian opened this issue Nov 10, 2015 · 7 comments
Closed

Temporary files are not removed from cache #89

dan-cristian opened this issue Nov 10, 2015 · 7 comments

Comments

@dan-cristian
Copy link
Contributor

After uploading a large amount of files I run out of local disk space and hubicfuse will crash.
I realised the problem is that hubicfuse does not delete the cached files stored on the temp folder.

Is there a local cache file delete function already implemented?

@TurboGit
Copy link
Owner

I'm still not sure why the cached file on the temp folders are not removed when uploaded? Is there a specific reason?

@dan-cristian
Copy link
Contributor Author

I have searched in the code base and could not find any line of code that
expicitly removes local files in temp dir. there is a // todo there
actually saying a better implementation is needed.
On Nov 10, 2015 22:55, "Pascal Obry" notifications@github.com wrote:

I'm still not sure why the cached file on the temp folders are not removed
when uploaded? Is there a specific reason?


Reply to this email directly or view it on GitHub
#89 (comment).

@nephaste
Copy link

same on my side on my Qnap, i have to move the temp file in .hubicfuse file on user space to not fill up ramdisk.

and temp files are staying in this directory not removed

@TurboGit
Copy link
Owner

Can you describe what are the steps to reproduce? I cannot find a single hubic temp file on my systems... And where temps files are stored for you when nothing defined in .hubicfuse (default setting)?

@dan-cristian
Copy link
Contributor Author

My Linux box is booting on a 8 GB USB stick, with 200 MB allocated for /tmp (tmpfs in RAM).
Initially I did not set a temp folder in the .hubicfuse and I quickly got 100% usage on /tmp. I have not looked for the actual files to see where they are placed in /tmp - but I will test it this evening.

After that I added a temp folder in .hubicfuse pointing to a temp folder on a larger hard drive. I can see the accessed files being added on that folder with the .cloudfusexxx naming.

@dan-cristian
Copy link
Contributor Author

Did some testing to reproduce the issue. By default if no custom temp file is set hubicfuse creates a temp file using this system function: http://linux.die.net/man/3/tmpfile. "The tmpfile() function opens a unique temporary file in binary read/write (w+b) mode. The file will be automatically deleted when it is closed or the program terminates." I think these files are not visible in /tmp folder but they will eat space.

I have implemented a fix when using a custom temp folder, is located in my work in progress branch (https://github.com/dan-cristian/hubicfuse/tree/utime). I'm doing some stress testing now and will let you know when is stable enough.

@dan-cristian
Copy link
Contributor Author

After running several tests it seems this is stable enough with the version in my master branch: https://github.com/dan-cristian/hubicfuse

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

3 participants