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

Delete older files from storage #282

Closed
Zaied opened this issue Oct 17, 2023 · 2 comments
Closed

Delete older files from storage #282

Zaied opened this issue Oct 17, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@Zaied
Copy link

Zaied commented Oct 17, 2023

We have been using this service for one of our projects for a while. But the problem storage often gets full and we get errors on the client side. We tried to run a cron job to run the command rm/rf to clean all older files but the issue is clearing too many files shows an error that arguments are too long.

Any way around to solve it?

@n0vad3v
Copy link
Member

n0vad3v commented Oct 17, 2023

Thanks for feedback, currently you can have a try using find, example:

0 0 * * * find /path/to/your/webp/exhaust/ -type f -ctime +1 -exec rm {} \;

Related issue: #214

@BennyThink BennyThink added documentation Improvements or additions to documentation question Further information is requested labels Oct 18, 2023
This was referenced Jun 28, 2024
@n0vad3v
Copy link
Member

n0vad3v commented Jun 29, 2024

Hi @Zaied ,We've released version 0.12.0 which contains a configuration called MAX_CACHE_SIZE that will automatically clean local files if local cache directories' size are larger than setting value, please give it a shot if you're interested. 😇
https://github.com/webp-sh/webp_server_go/releases/tag/0.12.0

Documentation: https://docs.webp.sh/usage/configuration/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants