Skip to content

Storage: ECONNRESET raised on blob.patch() #4353

@mathewcohle

Description

@mathewcohle

Traceback:

  File ...
    blob.patch()
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/storage/_helpers.py", line 147, in patch
    query_params={'projection': 'full'}, _target_object=self)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/_http.py", line 290, in api_request
    headers=headers, target_object=_target_object)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/_http.py", line 183, in _make_request
    return self._do_request(method, url, headers, data, target_object)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/_http.py", line 212, in _do_request
    url=url, method=method, headers=headers, data=data)
  File "/usr/local/lib/python2.7/dist-packages/google/auth/transport/requests.py", line 179, in request
    method, url, data=data, headers=request_headers, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 658, in send
    r.content
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 823, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 748, in generate
    raise ChunkedEncodingError(e)
ChunkedEncodingError: ('Connection broken: error("(104, \\'ECONNRESET\\')",)', error("(104, 'ECONNRESET')",))

where blob is instance of <google.cloud.storage.blob.Blob>. This happens occasionally when patching blob metadata, have not found how to reproduce reliably.

Setup:

$ python --version
Python 2.7.12

$ uname -a
Linux moby 4.9.49-moby #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ pip show show google-cloud
Name: google-cloud
Version: 0.27.0
Summary: API Client library for Google Cloud
Home-page: https://github.com/GoogleCloudPlatform/google-cloud-python
Author: Google Cloud Platform
Author-email: googleapis-publisher@google.com
License: Apache 2.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: google-cloud-bigquery, google-cloud-bigtable, google-cloud-core, google-cloud-datastore, google-cloud-dns, google-cloud-error-reporting, google-cloud-language, google-cloud-logging, google-cloud-monitoring, google-cloud-pubsub, google-cloud-resource-manager, google-cloud-runtimeconfig, google-cloud-spanner, google-cloud-speech, google-cloud-storage, google-cloud-translate, google-cloud-videointelligence, google-cloud-vision

$ pip freeze | grep requests
requests==2.18.4

$ pip freeze | grep urllib3
urllib3==1.22

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.status: duplicateDuplicate.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions