Project

General

Profile

Actions

Bug #12684

closed

Let user specify a retry strategy on the client object, used for all API calls

Added by Tom Morris over 6 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Story points:
2.0
Release relationship:
Auto

Description

Updated Feb 23, 2023

The SDK either doesn't retry at all, or doesn't retry enough. Requiring end users to manually provide num_retries on every call is not a (human) scalable solution.

  • The number of retries should be settable when creating the API object
    • This should be used for requests made while initializing the client object, like fetching the discovery document
  • The default retry count should be much more robust -- like 8 retries

Old ticket

This sounds like what #3147 was intended to address, but it's apparently not working:

Traceback (most recent call last):
  File "./myg_runs.py", line 244, in <module>
    main()
  File "./myg_runs.py", line 230, in main
    dump_subprojects(stats, project, SKIP_PROJECTS)
  File "./myg_runs.py", line 210, in dump_subprojects
    dump_pipeline_instances(stats, sp)
  File "./myg_runs.py", line 182, in dump_pipeline_instances
    time = dump_pipeline_instance(stats, i)
  File "./myg_runs.py", line 167, in dump_pipeline_instance
    dump_jobs(batchid, sample, cwl_runner['job']['components'])
  File "./myg_runs.py", line 84, in dump_jobs
    jobs = api.jobs().list(filters=[['uuid','=',job_uuid]]).execute()
  File "/usr/lib/python2.7/dist-packages/oauth2client/util.py", line 140, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/googleapiclient/http.py", line 840, in execute
    raise HttpError(resp, content, uri=self.uri)
arvados.errors.ApiError: <HttpError 502 when requesting https://e51c5.arvadosapi.com/arvados/v1/jobs?alt=json&filters=%5B%5B%22uuid%22%2C+%22%3D%22%2C+%22e51c5-8i9sb-b8od8nvombxq3h3%22%5D%5D returned "Bad Gateway">

Files

fuse.log (41.8 KB) fuse.log Brett Smith, 05/08/2023 08:49 PM

Subtasks 1 (0 open1 closed)

Task #20490: Review 12684-pysdk-auto-retryResolvedBrett Smith05/09/2023Actions

Related issues

Related to Arvados - Bug #3147: [SDKs] Python clients should automatically retry failed API and Keep requests (including timeouts), in order to survive temporary outages like server restarts and network blips.ResolvedBrett Smith08/22/2014Actions
Related to Arvados - Idea #20107: Research retry strategies when SDK API calls return 5xx errorsNewBrett SmithActions
Related to Arvados - Bug #20432: Improve CWL runner handling 503 errorsResolvedBrett SmithActions
Related to Arvados - Idea #7697: [SDKs] Improve socket error handling in PySDKResolvedTom Clegg10/29/2015Actions
Related to Arvados - Bug #7587: [SDKs] Python Google API client raises Broken Pipe socket.error after sitting idle for some timeResolvedBrett Smith10/22/2015Actions
Related to Arvados - Bug #20425: Inappropriate auto-retry when looking up collection by PDHResolvedTom Clegg06/09/2023Actions
Related to Arvados - Idea #20521: Python tools emit logs from googleapiclientNewActions
Related to Arvados - Idea #8539: [SDKs/FUSE] Better retry defaultsResolvedActions
Actions

Also available in: Atom PDF