-
Notifications
You must be signed in to change notification settings - Fork 3.1k
@aws-sdk/client-s3 ListObjectsV2Command
hangs forever when listing many files (>800)
#8947
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
Comments
Thanks for reporting, do you happen to know if it works with smaller output sizes? or does it always hang |
It does not hang with a smaller output size (either fewer objects to be returned by S3 or I have a S3 bucket with 2 folders, the first has 2 objects (does not hang), the second has 884 objects (hangs). |
RAM has increased abnormally high ? |
I am facing the same issue, bun version 1.0.28
However in my case it hangs on the first line itself, it doesn't even reach the client.send command. |
For me it's all related to something like #7428 where we have similar reports. For all aws-sdk a lot of hanging is expected. |
This exact same issue is happening to me, but on a bucket with <200 files. Bun will hang indefinitely when trying ListObjects or ListObjectsV2. I think the breaking change was introduced somewhere in 1.2, because it works when I downgrade to 1.1.31, and breaks when I use 1.2.2. Please investigate this, my work relies on Bun for many of our data transfer jobs |
I'm unable to run the ListObjectsV2 command at all using the @aws-sdk/client-s3. It just times out with a small number of files in the bucket. |
+1 |
I experienced a similar issue on import { paginateListObjectsV2, S3Client } from "@aws-sdk/client-s3";
const s3Client = new S3Client({ region: "ca-central-1" });
const BUCKET = "some_bucket";
const prefixes = ["at", "least", "four", "prefixes", "here"];
for (const prefix of prefixes) {
const paginator = paginateListObjectsV2(
{ client: s3Client },
{ Bucket: BUCKET, Prefix: prefix },
);
for await (const page of paginator) {
console.log(`Searching for objects in 's3://${BUCKET}/${prefix}'...`);
const contents = page.Contents || [];
console.log(`Found ${contents.length} objects`);
}
} # Stalls after 3 iterations of `paginator` (intermittently)
bun ./run.ts |
What version of Bun is running?
1.0.26+c75e768a6
What platform is your computer?
Darwin 23.3.0 arm64 arm
What steps can reproduce the bug?
Sending
ListObjectsCommand
(orListObjectsV2Command
) viaS3Client.send
hangs forever at runtime.What is the expected behavior?
Do not hang forever. At least fail and return an error or throw an exception.
What do you see instead?
When testing: the test fail due to timeout.
At runtime as an http handler and called via curl: the request hangs forever (until ctrl+c).
Additional information
I have two reproduction repositories available: one running on Bun (where the bug occurs), on running on Deno (no bug reproduced).
Tested with @aws-sdk/client-s3 at 3.449.0 and 3.511.0.
The text was updated successfully, but these errors were encountered: