Open siebrand opened 8 months ago
Hmm. This appears to be something we do have control over. It looks like it's a NodeJs thing and the AWS SDK has a way to override the socket count. This is probably slowing down S3P...
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
Yup, that's it. The default max appears to be 50, and you get the message right after you hit 50 list-workers:
s3p: d: 9s 185ms, items: 31044, items/s: 3379, listRequests: 64, listWorkers: 50, copied 2157/14196 3.90gB/26.38gB 434.61mB/s inFlight: 1.10gB copyWorkers: 500 + 0 copyQueue: 11539 + 0 same: 16848(36.96gB) toDelete: 0(0_B)
@smithy/node-http-handler:WARN socket usage at capacity=50 and 510 additional requests are enqueued. See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.
So, for now, you can probably avoid that warning by using this option: --list-concurrency 50
. Let me know if that works.
I should be able to set the AWS client's max-sockets to match the --list-concurrency setting. Something for the future.
Hello @shanebdavis ,
We are having the same error and we've tried evern with --list-concurrency setting and it's the same issue as explained above.
npx s3p sync --bucket "$SOURCE_BUCKET" --to-bucket "$DESTINATION_BUCKET" --list-concurrency 100 > "${LOG_FILE}_$CNT"
I very recently started using s3p latest (3.5.x), and I'm regularly seeing the message "@smithy/node-http-handler:WARN socket usage at capacity and additional requests are enqueued". That output seems unexpected.
The warning appears to be pretty harmless, but it's annoying to see the s3p output polluted. Would be great if something could be done to suppress it. From https://github.com/smithy-lang/smithy-typescript/blob/3b3774052b1985a680c3db7c244c59d03357b73c/packages/node-http-handler/src/node-http-handler.ts#L71 :
Caused by https://github.com/smithy-lang/smithy-typescript/pull/1164. This feature appears to have been added quite recently.