-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Fix backups stopping due to read timeouts #12281
Conversation
app/services/backup_service.rb
Outdated
@@ -143,6 +143,7 @@ def download_to_tar(tar, attachment, filename) | |||
end | |||
end | |||
rescue Errno::ENOENT | |||
rescue Seahorse::Client::NetworkingError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we getting a Seahorse error instead of a ::Fog::Errors::Error
, which paperclip rescues by default? This feels like a fog
bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paperclip doesn't use fog for S3.
app/services/backup_service.rb
Outdated
@@ -143,6 +143,7 @@ def download_to_tar(tar, attachment, filename) | |||
end | |||
end | |||
rescue Errno::ENOENT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be: rescue Errno::ENOENT, Seahorse::Client::NetworkingError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
If an attachment read times out, assume that the resources is inaccessible and continue the backup without it. This fixes mastodon#12280.
3821241
to
cd09d28
Compare
* Make BackupService resilient to read timeouts If an attachment read times out, assume that the resources is inaccessible and continue the backup without it. This fixes mastodon#12280. * Both errors on one line
If an attachment read times out, assume that the attachment is inaccessible and continue the backup without it. This fixes #12280.