Skip to content

s3 cp is stuck/hanging to complete uploading 1TB file

0

Hi,

I am attempting to upload a 1TB VeraCrypt container to S3 Deep Archive.

I have this profile:

[profile s3bucket]
aws_access_key_id = <key>
aws_secret_access_key = <key>
max_attempts = 10
retry_mode = standard

And ran this command:

aws s3 cp D:\Backup.vc s3://my-bucket-name/ --storage-class DEEP_ARCHIVE --profile s3bucket --output text --debug --cli-connect-timeout 0

It spent several hours uploading all the data (and I could see the progress consistently, going up toward 1TB of data sent). And then I went to sleep.

However, for over 4 hours, it's been stuck here:

2025-04-07 06:31:47,350 - ThreadPoolExecutor-0_8 - s3transfer.utils - DEBUG - Releasing acquire 0/None
2025-04-07 06:31:50,232 - ThreadPoolExecutor-0_3 - urllib3.connectionpool - DEBUG - https://my-bucket-name.s3.us-west-2.amazonaws.com:443 "PUT /Backup.vc?uploadId=[REDACTED]&partNumber=8189 HTTP/1.1" 200 0
2025-04-07 06:31:50,233 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event before-parse.s3.UploadPart: calling handler <function _handle_200_error at 0x000001E7E8017A60>
2025-04-07 06:31:50,234 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event before-parse.s3.UploadPart: calling handler <function handle_expires_header at 0x000001E7E8017880>
2025-04-07 06:31:50,234 - ThreadPoolExecutor-0_3 - botocore.parsers - DEBUG - Response headers: {'x-amz-id-2': '[REDACTED]', 'x-amz-request-id': '[REDACTED]', 'Date': 'Mon, 07 Apr 2025 05:31:09 GMT', 'ETag': '"[REDACTED]"', 'x-amz-checksum-crc64nvme': '[REDACTED]', 'x-amz-server-side-encryption': 'AES256', 'x-amz-storage-class': 'DEEP_ARCHIVE', 'Content-Length': '0', 'Server': 'AmazonS3'}
2025-04-07 06:31:50,234 - ThreadPoolExecutor-0_3 - botocore.parsers - DEBUG - Response body:
b''
2025-04-07 06:31:50,235 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <function _update_status_code at 0x000001E7E8017BA0>
2025-04-07 06:31:50,235 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x000001E7EA392D20>>
2025-04-07 06:31:50,236 - ThreadPoolExecutor-0_3 - botocore.retries.standard - DEBUG - Not retrying request. 2025-04-07 06:31:50,236 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <bound method S3RegionRedirectorv2.redirect_from_error of <botocore.utils.S3RegionRedirectorv2 object at 0x000001E7EA392A80>>
2025-04-07 06:31:50,236 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event after-call.s3.UploadPart: calling handler <function enhance_error_msg at 0x000001E7E976A020>
2025-04-07 06:31:50,237 - ThreadPoolExecutor-0_3 - botocore.hooks - DEBUG - Event after-call.s3.UploadPart: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x000001E7EA3920F0>>
2025-04-07 06:31:50,237 - ThreadPoolExecutor-0_3 - s3transfer.utils - DEBUG - Releasing acquire 0/None
2025-04-07 06:31:50,374 - ThreadPoolExecutor-0_4 - urllib3.connectionpool - DEBUG - https://my-bucket-name.s3.us-west-2.amazonaws.com:443 "PUT /Backup.vc?uploadId=[REDACTED]&partNumber=8192 HTTP/1.1" 200 0
2025-04-07 06:31:50,375 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event before-parse.s3.UploadPart: calling handler <function _handle_200_error at 0x000001E7E8017A60>
2025-04-07 06:31:50,375 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event before-parse.s3.UploadPart: calling handler <function handle_expires_header at 0x000001E7E8017880>
2025-04-07 06:31:50,375 - ThreadPoolExecutor-0_4 - botocore.parsers - DEBUG - Response headers: {'x-amz-id-2': '[REDACTED]', 'x-amz-request-id': '[REDACTED]', 'Date': 'Mon, 07 Apr 2025 05:31:33 GMT', 'ETag': '"[REDACTED]"', 'x-amz-checksum-crc64nvme': '[REDACTED]', 'x-amz-server-side-encryption': 'AES256', 'x-amz-storage-class': 'DEEP_ARCHIVE', 'Content-Length': '0', 'Server': 'AmazonS3'}
2025-04-07 06:31:50,376 - ThreadPoolExecutor-0_4 - botocore.parsers - DEBUG - Response body:
b''
2025-04-07 06:31:50,376 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <function _update_status_code at 0x000001E7E8017BA0>
2025-04-07 06:31:50,376 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x000001E7EA392D20>>
2025-04-07 06:31:50,377 - ThreadPoolExecutor-0_4 - botocore.retries.standard - DEBUG - Not retrying request.
2025-04-07 06:31:50,377 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <bound method S3RegionRedirectorv2.redirect_from_error of <botocore.utils.S3RegionRedirectorv2 object at 0x000001E7EA392A80>>
2025-04-07 06:31:50,377 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event after-call.s3.UploadPart: calling handler <function enhance_error_msg at 0x000001E7E976A020>
2025-04-07 06:31:50,378 - ThreadPoolExecutor-0_4 - botocore.hooks - DEBUG - Event after-call.s3.UploadPart: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x000001E7EA3920F0>>
2025-04-07 06:31:50,378 - ThreadPoolExecutor-0_4 - s3transfer.utils - DEBUG - Releasing acquire 0/None

Absolutely no further output, and doesn't seem "crashed" yet (meaning, the command is still running, not exited),
and the file isn't in listed the bucket yet.

Is this normal?

I'm afraid of killing the command and then have to start over, without any guarantee it won't do the same again.

Any ideas?
Thanks!

2 Answers
0

For an upload of this size, I would recommend setting the S3 CLI's preferred transfer client to the newer Common Runtime mode, as follows:

aws configure set default.s3.preferred_transfer_client crt

I'm afraid I can't offer any guidance on the errors you're seeing, but this might help. And if it doesn't, I would recommend following https://docs.aws.amazon.com/AmazonS3/latest/userguide/tutorial-s3-mpu-additional-checksums.html so you have more control. Please let us know how you get on

AWS
EXPERT

answered 2 years ago

-1

The behavior you're experiencing with the S3 upload of a large 1TB file is not typical, but it's not uncommon for very large file uploads to encounter issues. Here are some insights and suggestions:

  1. Multipart Upload: For files larger than 100MB, AWS S3 uses multipart uploads. Your debug log shows that it's uploading part numbers in the 8000+ range, which indicates the multipart upload is being used.

  2. Completion Phase: It appears that all parts have been uploaded successfully (as indicated by the 200 status codes), and the process may be in the final stages of completing the multipart upload. This completion phase can take some time for very large files, especially when using the DEEP_ARCHIVE storage class.

  3. Network Issues: The long pause could be due to network instability or timeouts, especially given the file size and storage class.

  4. CLI Configuration: You might want to adjust some AWS CLI configuration parameters to optimize for large file uploads. Consider setting:

    • multipart_threshold: 8MB (default)
    • multipart_chunksize: 8MB (default)
    • max_concurrent_requests: 10 (default)
    • max_queue_size: 1000 (default)

    You can increase these values to potentially improve upload performance.

  5. Resuming Upload: If you do decide to interrupt the process, you can usually resume the upload using the same command with the --continue flag. This should pick up where it left off without starting over completely.

  6. Monitoring: You can use another terminal to run 'aws s3 ls s3://my-bucket-name/' periodically to check if the file appears in the bucket, which would indicate completion.

  7. S3 Transfer Acceleration: For future uploads, consider using S3 Transfer Acceleration, which can significantly improve upload speeds for large files, especially over long distances.

Given the current situation, it might be worth waiting a bit longer if possible, as the upload may eventually complete. If you do decide to interrupt, use the --continue option when restarting to avoid uploading the entire file again.

For future large uploads, consider splitting very large files into smaller chunks before uploading, or use specialized tools designed for handling extremely large file transfers to S3.
Sources
S3 Transfer Rates Capped at 2.8mb/s ??? How Can I Speed This Up? | AWS re:Post
cp — AWS CLI 2.25.11 Command Reference
Upload large files to S3 via CLI | AWS re:Post
low s3 speed from EC2 | AWS re:Post

answered 2 years ago

  • I know how to use AI, but I came here to see if I can get a response from a human :)

    There's no point setting configs to defaults, since they're already "defaults".

    "--continue" isn't a parameter of "aws s3 cp".

    I already did "ls", as I said the file isn't in the bucket yet. (it's however in the pending multipart uploads list)

    The command is still running, but no progress since, yet.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.