Skip to content
Bug Barometer
All issues
Solution in Progress

MuleSoft / MuleSoft Runtime 4

Mule Runtime | Amazon S3 Connector Buffers Repeatable Streams in Memory and Logs "supplied stream is not resettable"

Summary

When a Mule application passes a repeatable stream (the default repeatable file-store stream, or a repeatable in-memory stream) to an Amazon S3 Connector 8.0.x upload operation such as Put Object or Upload Part, the Mule runtime reports the stream as not rewindable, even though repeatable streams can be rewound.


As a result, the connector:

- Copies request bodies up to 64 MiB entirely into heap memory before sending them, which increases memory usage, especially for large multipart uploads.

- Sends request bodies larger than 64 MiB without the ability to replay them, so if the AWS SDK retries the request, the upload can fail with S3:REQUEST_TIMEOUT.


All streaming strategies behave the same way. Uploads that are not retried complete successfully, and no data is lost.


The issue is in the Mule runtime, not in the Amazon S3 Connector. It affects Mule runtime 4.12.x and 4.13.x, including 4.12.5, 4.12.6, and 4.13.2.

Workaround

No configuration change makes the runtime report a repeatable stream as rewindable.

Steps to reproduce

1. Deploy a Mule application on Mule runtime 4.12.6 that uses Amazon S3 Connector 8.0.10.

2. Create a flow that reads a file (for example, from an HTTP Request with a Content-Length header) using the default repeatable file-store streaming strategy, and passes the payload to the Put Object operation.

3. Upload a 5 MiB file and then a 70 MiB file.

4. Check the application log. For the 5 MiB file, the connector logs a warning that the supplied stream is not resettable and that the body is buffered in memory. For the 70 MiB file, the connector logs a warning that the content length exceeds the in-memory buffer cap and that SDK retries will not be able to replay the body.

5. Repeat with a repeatable in-memory streaming strategy. The same warnings appear.

Error details

AsyncStreamingRequestBody: Content length N bytes is known but the supplied stream is not resettable. Buffering the body in memory to support SDK retries and multi-attempt uploads. Supply a rewindable (mark-supported) stream to avoid this. AsyncStreamingRequestBody: Content length N bytes exceeds the in-memory buffer cap (67108864 bytes) — storing the non-resettable stream reference directly. SDK retries will NOT be able to replay this body; the request may fail with S3:REQUEST_TIMEOUT if the SDK retries. Supply a rewindable (mark-supported) stream to eliminate retry-fragility. S3:REQUEST_TIMEOUT

History

  1. Description updated

    Nov 30, 2026

  2. First tracked here as Solution in Progress with 1 report

    Nov 30, 2026