Skip to content

Fix backups stopping due to read timeouts#12281

Merged
Gargron merged 2 commits intomastodon:masterfrom
cybrespace:fix-backup-timeout-error
Dec 30, 2019
Merged

Fix backups stopping due to read timeouts#12281
Gargron merged 2 commits intomastodon:masterfrom
cybrespace:fix-backup-timeout-error

Conversation

@chr-1x
Copy link
Copy Markdown
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.

Comment thread app/services/backup_service.rb Outdated
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread app/services/backup_service.rb Outdated
Copy link
Copy Markdown
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
Copy Markdown
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.
@chr-1x chr-1x force-pushed the fix-backup-timeout-error branch from 3821241 to cd09d28 Compare December 24, 2019 07:05
@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
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