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

Fix backups stopping due to read timeouts #12281

Merged
merged 2 commits into from
Dec 30, 2019

Conversation

chr-1x
Copy link
Contributor

@chr-1x chr-1x commented Nov 2, 2019

If an attachment read times out, assume that the attachment is inaccessible and continue the backup without it. This fixes #12280.

@@ -143,6 +143,7 @@ def download_to_tar(tar, attachment, filename)
end
end
rescue Errno::ENOENT
rescue Seahorse::Client::NetworkingError
Copy link
Member

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

Copy link
Member

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.

@@ -143,6 +143,7 @@ def download_to_tar(tar, attachment, filename)
end
end
rescue Errno::ENOENT
Copy link
Member

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

Copy link
Contributor Author

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.
@Gargron Gargron changed the title Make BackupService resilient to read timeouts Fix backups stopping due to read timeouts Dec 30, 2019
@Gargron Gargron merged commit 7e07461 into mastodon:master Dec 30, 2019
rtucker pushed a commit to vulpineclub/mastodon that referenced this pull request Jan 7, 2021
* 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
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.

BackupWorker fails if S3 media read times out
3 participants