Actions
Bug #7587
closed[SDKs] Python Google API client raises Broken Pipe socket.error after sitting idle for some time
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
Actions