← Debugging Guides

阅读中文版本

AWS S3 — multipart upload stalled and never completed

An S3 multipart upload stalls because individual parts time out or the network drops, leaving an incomplete upload that incurs storage costs until aborted.

intermediatedebuggings3upload

Symptoms

  • Upload progress stops at a part and never resumes
  • CompleteMultipartUpload fails with NoSuchUpload
  • Incomplete multipart uploads appear in S3 lifecycle

Possible causes

  • Network interruption during a part upload with no retry logic
  • The client process crashed before calling complete or abort
  • Part size is too large, causing timeouts on slow connections

Diagnosis steps

List incomplete multipart uploads

aws s3api list-multipart-uploads --bucket mybucket

Interpretation

Shows in-progress uploads that were never completed or aborted.

Check upload progress logs

grep "upload" logs/app.log | tail -20

Interpretation

Identify which part stalled and when the upload stopped.

Root cause

One or more parts failed to upload and the client did not retry or call CompleteMultipartUpload, leaving the upload in an incomplete state.

Fix

Implement per-part retry with backoff, use a smaller part size for slow connections, and call AbortMultipartUpload on failure to avoid storage charges.

Verify the fix

Upload a large file and confirm it completes; simulate a network drop and verify the client retries and completes or aborts cleanly.

Symptom walkthrough

An S3 multipart upload stalls because individual parts time out or the network drops, leaving an incomplete upload that incurs storage costs until aborted. The error appears in production but may not surface in local development because the conditions that trigger it depend on the deployment environment or runtime configuration. Understanding the full symptom set helps distinguish this issue from similar errors.

Diagnosis in practice

Follow the diagnosis steps in the frontmatter to isolate the cause. Each step includes a command and an interpretation of the output. The goal is to narrow down whether the issue is in the configuration, the runtime, or the application code. Reproduce the error in a minimal setup before applying a fix.

Root cause

One or more parts failed to upload and the client did not retry or call CompleteMultipartUpload, leaving the upload in an incomplete state.

Fix

Implement per-part retry with backoff, use a smaller part size for slow connections, and call AbortMultipartUpload on failure to avoid storage charges. After applying the fix, monitor the system to confirm the error does not recur under load or in different environments.

Verification

Upload a large file and confirm it completes; simulate a network drop and verify the client retries and completes or aborts cleanly. If the verification passes, the fix is confirmed; if not, re-examine the diagnosis steps for missed contributing factors.

Diagnostic commands

Run these commands to reproduce and diagnose the issue:

aws s3api list-multipart-uploads --bucket mybucket
grep "upload" logs/app.log | tail -20