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

If no space left then remove old cache #2342

Conversation

dosuken123
Copy link
Contributor

@dosuken123 dosuken123 commented Oct 15, 2018

Hi from GitLab

Currently, we're experiencing that Carrierwave raises Errno::ENOSPC when caching files. This is because inodes are full in the cache directory regardless of that its capacity has still some room. (See more https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5217) We manually removed old cache files/directories and the situation was mitigated, but this could happen in the future again, and ideally this recovery process should be automated.

/cc @stanhu

@dosuken123
Copy link
Contributor Author

cc @stanhu

@dosuken123
Copy link
Contributor Author

One concern is that when EMLINK or ENOSPC was raised, CarrierWave tries to remove cache files older than 10 minutes. This is hard coded.

I'm not sure if this value is proper for gitlab.com though, maybe it's better to parameterize this value via overriding a method e.g.

def cache_retention_policy
  10.days
end

@dosuken123
Copy link
Contributor Author

cc @ayufan @amatsuda

@mshibuya mshibuya merged commit b8c7b41 into carrierwaveuploader:master Oct 16, 2018
@mshibuya
Copy link
Member

Awesome, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants