B2 CLI Hanging and Not Completing

Đang mở
#1,118 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #548 của @ppolewicz — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cloud, python
Lĩnh vực
cli, cloud

Hướng nghiên cứu

The hang is in the b2 sync upload path, where b2sdk's retry logic in b2http.py keeps backing off on 503 vault cannot start new uploads responses and the upload URL pool in upload_url_pool is involved. Start by reproducing with a forced 503 on b2_upload_file and checking whether the retry loop has a cap or timeout. Done would mean sync fails or completes after a bounded number of retries. The only linked pull request was closed without merging, and the maintainers have not settled the expected behaviour, so confirm scope with them before writing code.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

We have a report from a customer that the b2 sync command is hanging and not completing. This is causing lots of issues with the user's ability to keep their project websites updated.

This is the current error they are seeing:

This is the current error I am seeing, literally occurred just now (5ish minutes ago). A couple of files uploaded, and then this error. As mentioned above, the “pause” keeps incrementing, but it just increments and increments and never resolves — seemingly hung forever.

b2sdk._internal.exception.ServiceError: 503 service_unavailable vault cannot start new uploads
INFO:b2sdk._internal.b2http:Pausing thread for 17 seconds because that is what the default exponential backoff is
DEBUG:urllib3.connectionpool:Resetting dropped connection: [pod-000-1133-02.backblaze.com](http://pod-000-1133-02.backblaze.com/)

They were able to get debug logs:

DEBUG:b2sdk._internal.exception:calling interpret_b2_error(status=503, code='service_unavailable', message='vault cannot start new uploads', response_headers={'Server': 'nginx', 'Date': 'Tue, 07 Oct 2025 18:06:11 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': '99', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0, no-cache, no-store', 'Strict-Transport-Security': 'max-age=63072000'}, post_params=None)
DEBUG:b2sdk._internal.b2http:503 service_unavailable vault cannot start new uploads
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/b2-tools/4.4.2/libexec/lib/python3.13/site-packages/b2sdk/_internal/b2http.py", line 597, in _translate_and_retry
    return cls._translate_errors(fcn, post_params)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/b2-tools/4.4.2/libexec/lib/python3.13/site-packages/b2sdk/_internal/b2http.py", line 525, in _translate_errors
    raise interpret_b2_error(
    ...<5 lines>...
    )
b2sdk._internal.exception.ServiceError: 503 service_unavailable vault cannot start new uploads
INFO:b2sdk._internal.b2http:Pausing thread for 3 seconds because that is what the default exponential backoff is
DEBUG:urllib3.connectionpool:Resetting dropped connection: [pod-000-1121-05.backblaze.com](http://pod-000-1121-05.backblaze.com/)
DEBUG:urllib3.connectionpool:[https://pod-000-1162-08.backblaze.com:443](https://pod-000-1162-08.backblaze.com/) "POST /b2api/v4/b2_upload_file/21e799824398e2af83430a16/c002_v0001162_t0059 HTTP/1.1" 200 780
DEBUG:b2sdk._internal.account_info.upload_url_pool:calling UrlPoolAccountInfo.put_bucket_upload_url(self=<b2sdk._internal.account_info.sqlite_account_info.SqliteAccountInfo object at 0x103d1c980>, bucket_id='21e799824398e2af83430a16') (hidden args: upload_url, upload_auth_token)
upload
DEBUG:urllib3.connectionpool:[https://pod-000-1121-05.backblaze.com:443](https://pod-000-1121-05.backblaze.com/) "POST /b2api/v4/b2_upload_file/" 503 106
DEBUG:b2sdk._internal.exception:calling interpret_b2_error(status=503, code='service_unavailable', message='connection interrupted, retry request', response_headers={'Server': 'nginx', 'Date': 'Tue, 07 Oct 2025 18:06:12 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': '106', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0, no-cache, no-store', 'Strict-Transport-Security': 'max-age=63072000'}, post_params=None)
DEBUG:b2sdk._internal.b2http:503 service_unavailable connection interrupted, retry request
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/b2-tools/4.4.2/libexec/lib/python3.13/site-packages/b2sdk/_internal/b2http.py", line 597, in _translate_and_retry
    return cls._translate_errors(fcn, post_params)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/b2-tools/4.4.2/libexec/lib/python3.13/site-packages/b2sdk/_internal/b2http.py", line 525, in _translate_errors
    raise interpret_b2_error(
    ...<5 lines>...
    )

b2sdk._internal.exception.ServiceError: 503 service_unavailable vault cannot start new uploads
INFO:b2sdk._internal.b2http:Pausing thread for 64 seconds because that is what the default exponential backoff is
Ngôn ngữ chính
Python
Star
638
Fork
138
Merge trung bình
8 giờ 27 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Backblaze/B2_Command_Line_Tool

Tất cả issue của Backblaze/B2_Command_Line_Tool

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.