Bug #17171

[sdk] unreasonable python SDK timeout when ARVADOS_API_HOST is reachable

Added by Ward Vandewege about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

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

History

#1 Updated by Ward Vandewege about 2 months ago

  • Description updated (diff)

Also available in: Atom PDF