Skip to content
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

(fix) Enable logging; fix large videos on slow connection #10

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

kolupaev
Copy link
Contributor

Description of changes:

When uploading large videos to the s3 bucket (~200mb) on a slow uplink (2 Mb/s) a stall protection for upload kick in.

This protection incorrectly detects stalled upload and panics, even on active uploads healthy uploads.

See awslabs/aws-sdk-rust#1146

Crate changes:

  • add log and env_logger to aid debugging and root causing
  • update aws-sdk to latest

Testing:

RUST_LOG=debug cargo run -- -i "~/Downloads/meeting.mp4" -o text

Issue:


RUST_LOG=debug cargo run --  -o text -i ~/Downloads/not_so_humongous_video.mp4

[2024-08-16T16:00:21Z DEBUG hyper::proto::h1::io] flushed 4096 bytes
[2024-08-16T16:00:21Z DEBUG hyper::proto::h1::io] flushed 4096 bytes
[2024-08-16T16:00:21Z DEBUG hyper::proto::h1::io] flushed 4096 bytes
[2024-08-16T16:00:21Z DEBUG hyper::proto::h1::io] flushed 4096 bytes
[2024-08-16T16:00:21Z DEBUG hyper::proto::h1::io] flushed 4096 bytes
[2024-08-16T16:00:21Z DEBUG hyper::proto::h1::io] flushed 3732 bytes
⠦ Using bucket region us-east-1[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
⠖ Using bucket region us-east-1[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
⠒ Using bucket region us-east-1[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
⠐ Using bucket region us-east-1[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] current throughput: 0 B/s is below minimum: 1 B/s
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::http::body::minimum_throughput] grace period ended; timing out request
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::orchestrator] encountered orchestrator error; halting
[2024-08-16T16:00:21Z DEBUG tracing::span] finally_attempt;
[2024-08-16T16:00:21Z DEBUG rustls::common_state] Sending warning alert CloseNotify
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::retries::strategy::standard] not retrying because we are out of attempts attempts=3 max_attempts=3
[2024-08-16T16:00:21Z DEBUG aws_smithy_runtime::client::orchestrator] a retry is either unnecessary or not possible, exiting attempt loop
[2024-08-16T16:00:21Z DEBUG tracing::span] finally_op;
Error: Failed to upload to S3

Caused by:
    0: dispatch failure
    1: timeout
    2: minimum throughput was specified at 1 B/s, but throughput of 0 B/s was observed

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

When uploading large videos to the s3 bucket (~200mb) on a slow uplink
(2 Mb/s) a stall protection for upload kick in.

This protection incorrectly detects stalled upload and panics, even on
active uploads healthy uploads.

See awslabs/aws-sdk-rust#1146

Crate changes:

- add log and env_logger to aid debugging and root causing
- update aws-sdk to latest

Testing:

RUST_LOG=debug cargo run -- -i "~/Downloads/meeting.mp4" -o text
@jbnunn jbnunn merged commit 294c94b into awslabs:main Sep 3, 2024
@jbnunn
Copy link
Contributor

jbnunn commented Sep 3, 2024

Thanks @kolupaev for the PR and solid description of the issue. And, thank you for updating dependencies to latest versions as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants