soto: bodyLengthMismatch errors from S3 putObject with stream

Using version 5 beta branch and AWSPayload.stream, the S3 putObject request fails with HTTPClientError.bodyLengthMismatch for certain files. Many files will upload fine, and then in will repeatedly fail for a certain file. It seems related to the size of the ByteBuffer that I return from the closure argument to AWSPayload.stream. But I can’t see why it likes some sizes and not others.

(In a previous version of this comment I said it was anything over a certain size, but I see now that is not the case.)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

I thought I saw it again earlier, but it could be a bug in my code. I’m uploading tons of files so lots of testing. I’ll close this in a few days if I don’t see it again, if that’s okay.

Okay. I’ll be re-running things in the next hour or so, and I’ll find out what’s going on.