Project

General

Profile

Actions

Bug #17171

closed

[sdk] unreasonable python SDK timeout when ARVADOS_API_HOST is reachable

Added by Ward Vandewege about 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Start date:
04/15/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

The Python SDK seems to take a long time to time out when ARVADOS_API_HOST is unreachable:

$ time arv-user-activity --days 1
Traceback (most recent call last):
  File "/usr/bin/arv-user-activity", line 8, in <module>
    sys.exit(main())
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/arvados_user_activity/main.py", line 48, in main
    arv = arvados.api()
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/arvados/api.py", line 214, in api
    version=version, cache=cache, request_id=request_id, **kwargs)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/arvados/api.py", line 282, in api_from_config
    return api(version=version, host=host, token=token, insecure=insecure, **kwargs)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/arvados/api.py", line 240, in api
    svc = apiclient_discovery.build('arvados', version, cache_discovery=False, **kwargs)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/googleapiclient/discovery.py", line 222, in build
    requested_url, discovery_http, cache_discovery, cache)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/googleapiclient/discovery.py", line 269, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/arvados/api.py", line 111, in _intercept_http_request
    return self.orig_http_request(uri, method, headers=headers, **kwargs)
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/httplib2/__init__.py", line 1994, in request
    cachekey,
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/httplib2/__init__.py", line 1651, in _request
    conn, request_uri, method, body, headers
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/httplib2/__init__.py", line 1557, in _conn_request
    conn.connect()
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/httplib2/__init__.py", line 1391, in connect
    raise socket_err
  File "/usr/share/python3/dist/python3-arvados-user-activity/lib/python3.7/site-packages/httplib2/__init__.py", line 1324, in connect
    sock.connect((self.host, self.port))
TimeoutError: [Errno 110] Connection timed out

real    6m38.024s
user    0m0.366s
sys    0m0.024s

Subtasks 1 (0 open1 closed)

Task #17537: Review 17171-pysdk-timeout-fixResolvedNico César04/15/2021

Actions

Related issues 1 (0 open1 closed)

Related to Arvados - Bug #17989: PySDK socket read timeout on big collection create callsResolvedLucas Di Pentima09/07/2021

Actions
Actions

Also available in: Atom PDF