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

Clean up /tmp files #41

Closed
sebsel opened this issue May 26, 2018 · 2 comments
Closed

Clean up /tmp files #41

sebsel opened this issue May 26, 2018 · 2 comments

Comments

@sebsel
Copy link

sebsel commented May 26, 2018

I am not really a sysadmin, so maybe I'm missing a command I should be running, but: of my 50GB, 44GB was filled with aperturexxxx-files in my /tmp folder, freezing my server :)

A little search through the code spots these ones:

$filedata = tempnam(sys_get_temp_dir(), 'aperture');
$fileheader = tempnam(sys_get_temp_dir(), 'aperture');

At the end of the method, there is an unlink(), but that does not seem to work (maybe you miss a fclose() here?) There is also this $resized one that does not get unlinked.

@sebsel
Copy link
Author

sebsel commented May 26, 2018

Seems like it was a permission problem on my end: it couldn't create certain media-files, so it kept trying to download it. And since it crashed on that, it never came to unlink the tmp-files.

@aaronpk
Copy link
Owner

aaronpk commented Jun 17, 2018

Looks like I missed cleaning up the resized files. The other ones look right, there's an fclose right after the file is written before it's used again later. I also had the crashing problem myself at one point, I'm not sure how best to deal with that though.

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

2 participants