Duplicacy shall retry at least once on broken S3 connection

Please describe what you are doing to trigger the bug:
Backup to flaky S3 endpoint over flaky connection

Please describe what you expect to happen (but doesn’t):
I expect duplciacy to retry S3 request if it fails spuriously and continue backup

Please describe what actually happens (the wrong behaviour):
Duplicacy aborts backup with the message similar to:

Failed to upload the chunk 25f315347a7b6bf50f5fd363729945c4785717b77cf10d91003c51fd078a2687: RequestError: send request failed caused by: Put "https://duplicacy.gateway.storjshare.io/duplicacy/chunks/25/f315347a7b6bf50f5fd363729945c4785717b77cf10d91003c51fd078a2687": read tcp 10.0.17.48:31127->185.244.226.3:443: read: connection reset by peer

I think the AWS s3 client already has a built-in retry mechanism:

Maybe the default 3 retries aren’t enough for Storj. Then we need to add a method to configure the number of retries.

1 Like

If I remember correctly there were no other logs indicating that retries have happened, but I’ll double check later tonight and get back.

Retries happen inside the AWS client (github.com/aws/aws-sdk-go), so there won’t be any Duplicacy log showing that.

1 Like

Oh yes, you are right. My bad.

If three times it failed it’s unlikely it will succeed the fourth.