Project

General

Profile

Actions

Bug #7587

closed

[SDKs] Python Google API client raises Broken Pipe socket.error after sitting idle for some time

Added by Brett Smith over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Story points:
1.0

Description

Occasionally, after sitting idle for a while, when you make an API request using the Python Google API client, it raises this exception:

Traceback (most recent call last):
File "/tmp/crunch-job/src/crunch_scripts/run-command", line 444, in <module>
  'progress':1.0
File "/tmp/crunch-job-work/.arvados.venv/local/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
  return wrapped(*args, **kwargs)
File "/tmp/crunch-job-work/.arvados.venv/local/lib/python2.7/site-packages/googleapiclient/http.py", line 722, in execute
  body=self.body, headers=self.headers)
File "/tmp/crunch-job-work/.arvados.venv/local/lib/python2.7/site-packages/arvados/api.py", line 32, in http_request
  return self.orig_http_request(uri, **kwargs)
File "/tmp/crunch-job-work/.arvados.venv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1609, in request
  (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/tmp/crunch-job-work/.arvados.venv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1351, in _request
  (response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/tmp/crunch-job-work/.arvados.venv/local/lib/python2.7/site-packages/httplib2/__init__.py", line 1273, in _conn_request
  conn.request(method, request_uri, body, headers)
File "/usr/lib/python2.7/httplib.py", line 973, in request
  self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request
  self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
  self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
  self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 805, in send
  self.sock.sendall(data)
File "/usr/lib/python2.7/ssl.py", line 329, in sendall
  v = self.send(data[count:])
File "/usr/lib/python2.7/ssl.py", line 298, in send
  v = self._sslobj.write(data)
socket.error: [Errno 32] Broken pipe

The first line is the API call, which varies by application, but the rest of the exception is remarkably consistent. We have seen this in a few different run-command jobs, in multiple clusters, when run-command updates the task after it finishes uploading output to Keep. We have also seen it happen after a long-running arv-put finishes writing to Keep and tries to make a collection.


Files

7587-idle-api.py (1.47 KB) 7587-idle-api.py Brett Smith, 10/16/2015 02:19 PM

Subtasks 2 (0 open2 closed)

Task #7640: Review 7587-httplib2-retries-wip (no test yet beyond the successful job)ResolvedNico César10/22/2015Actions
Task #7647: Review 7587-pysdk-retry-test-wipResolvedBrett Smith10/23/2015Actions

Related issues

Related to Arvados - Bug #7496: [SDKs] picard run-command fails with Broken Pipe socket.error on tb05zResolved10/09/2015Actions
Related to Arvados - Bug #7572: [SDKs] arv-put crashes with Broken Pipe socket.error after uploading 60GBClosed10/15/2015Actions
Related to Arvados - Bug #12684: Let user specify a retry strategy on the client object, used for all API callsResolvedBrett Smith05/09/2023Actions
Actions

Also available in: Atom PDF