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

Carrierwave 3 extremely slow (retrieve_from_store! calling s3 over and over) #2697

Closed
Amnesthesia opened this issue Sep 5, 2023 · 8 comments

Comments

@Amnesthesia
Copy link

Amnesthesia commented Sep 5, 2023

We're trying to figure out what's happened in version 3 of Carrierwave, where S3 is now so slow that it's virtually unusable.

Carrierwave seems to retrieve_from_store! as soon as you access #uploaders, and if a file doesn't exist on S3 (for whatever reason), it will keep retrying over and over and over, making it virtually unusable — but even when nothing is wrong, #store! seems to suffer from something similar. Uploading a < 500kb file takes over 10 seconds

Can't even access the uploader — even to get #identifier — without S3 being called and the file retrieved from store

@Amnesthesia
Copy link
Author

Closing this because I submitted a pull request to fix this instead

@wrmk
Copy link

wrmk commented Sep 27, 2023

Faced the same problem: The application became very slow after upgrading to the 3 version.

@Amnesthesia
Copy link
Author

@wrmk Have you managed to resolve it? and have you tried my PR out to see if that resolved it for you?

@wrmk
Copy link

wrmk commented Sep 29, 2023

@wrmk Have you managed to resolve it? and have you tried my PR out to see if that resolved it for you?

We downgraded to the 2 version. Have no possibility to investigate how to resolve or try your PR.

@rajyan
Copy link
Contributor

rajyan commented Sep 29, 2023

I think this issue might be releated
fog/fog-aws#690
could someone confirm whether the latest master of fog-aws eases this issue?

@geemus
Copy link
Contributor

geemus commented Sep 29, 2023

fog-aws v3.21.0 has fixes which seem related (it should help with the retries)

@Amnesthesia
Copy link
Author

@geemus Thank you! We just found that this was all caused by fog and solved it by replacing fog with carrierwave-aws instead

@geemus
Copy link
Contributor

geemus commented Oct 4, 2023

@Amnesthesia sorry to hear you aren't using fog any more, but glad your problem is solved.

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

4 participants