GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — When DatastoreImpl.runQuery() gets a 503 it does not retry · Issue #244 · googleapis/google-cloud-java

When DatastoreImpl.runQuery() gets a 503 it does not retry #244

New issue
Copy link
New issue
Copy link
Closed
Closed
When DatastoreImpl.runQuery() gets a 503 it does not retry#244
Copy link
Assignees
mziccard
Labels
🚨 criticalP0 critical issue. Requires immediate fixtriage meI really want to be triaged.

Description

@simon-temple
simon-temple
opened on Oct 12, 2015
Issue body actions

I'm getting a "Could not reach service" DatastoreException when retrying would run the query successfully.

com.google.gcloud.datastore.DatastoreException: Could not reach service
    at com.google.gcloud.datastore.DatastoreException$Code.translate(DatastoreException.java:87)
    at com.google.gcloud.datastore.DatastoreException.translateAndThrow(DatastoreException.java:140)
    at com.google.gcloud.datastore.DatastoreException.translateAndThrow(DatastoreException.java:120)
    at com.google.gcloud.datastore.DatastoreImpl.runQuery(DatastoreImpl.java:113)
    at com.google.gcloud.datastore.QueryResultsImpl.sendRequest(QueryResultsImpl.java:66)
    at com.google.gcloud.datastore.QueryResultsImpl.(QueryResultsImpl.java:56)
    at com.google.gcloud.datastore.DatastoreImpl.run(DatastoreImpl.java:102)
    at com.google.gcloud.datastore.DatastoreImpl.run(DatastoreImpl.java:98)
...

Activity

Next
  1. simon-temple commented on Oct 12, 2015

    @simon-temple
    simon-temple
    on Oct 12, 2015
    Author
    More actions

    Running 0.0.8-SNAPSHOT

  2. mziccard commented on Oct 12, 2015

    @mziccard
    mziccard
    on Oct 12, 2015
    Contributor
    More actions

    Hi @simon-temple!
    I tried to reproduce the error with a test but it seems to me that the request is being retried.
    Could you share with us the code you used to create DatastoreService (and its options) and the code that throws the exception? Are you providing some RetryParams to DatastoreOptions, like:

    DatastoreOptions options = DatastoreOptions.builder()
      .retryParams(RetryParams.getDefaultInstance())
      .serviceRpcFactory(rpcFactoryMock)
      .build();
  3. simon-temple commented on Oct 12, 2015

    @simon-temple
    simon-temple
    on Oct 12, 2015
    Author
    More actions

    Ah! Maybe that's because I did not specify RetryParams... if I don't specify them to the options builder do I get NO_RETRIES as default?

    PrivateKey pk = PkiUtils.pkcs8PemDecode( pemPrivateKey );
    AuthCredentials credentials = AuthCredentials.createFor( clientId, pk );
    
    options = DatastoreOptions.builder()
                .authCredentials( credentials )
                .build();
    
    Datastore datastore = DatastoreFactory.instance().get( options );
  4. mziccard commented on Oct 12, 2015

    @mziccard
    mziccard
    on Oct 12, 2015
    Contributor
    More actions

    Yes, if you do not explicitly set retryParams the default behaviour is doing no retries. See here.

    But we should document this. Please do not close this issue, I'll close it as soon as we add better javadoc.

  5. simon-temple commented on Oct 12, 2015

    @simon-temple
    simon-temple
    on Oct 12, 2015
    Author
    More actions

    Thanks again for your help... I'll start with

    RetryParams.getDefaultInstance() 
    

    and see how we get on.

  6. mziccard commented on Oct 12, 2015

    @mziccard
    mziccard
    on Oct 12, 2015
    Contributor
    More actions

    You're welcome!
    You should not have problems with getDefaultInstance but if you need to, you can also build your own retry configuration:

    RetryParams.builder()
      .retryMaxAttempts(10)
      .retryMinAttempts(6)
      .maxRetryDelayMillis(30000)
      .totalRetryPeriodMillis(120000)
      .initialRetryDelayMillis(250)
      .build()
  7. mziccard commented on Oct 12, 2015

    @mziccard
    mziccard
    on Oct 12, 2015
    Contributor
    More actions

    Closed with #246

  8. mziccard
    closed this as completedon Oct 12, 2015
  9. yoshi-automation
    added
    🚨 criticalP0 critical issue. Requires immediate fix
    triage meI really want to be triaged.
    on Apr 6, 2020
  10. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  11. github-actions
    added 4 commits that reference this issue on Jun 23, 2022

    chore(main): release 1.2.1 (#244)

    438954b

    chore(deps): update dependency com.google.cloud:google-cloud-resource…

    d877cb0

    chore: update dependencies for regapic (googleapis#1467) (googleapis#244

    f4ff622

    chore: Disable CLIRR checks on releas (#1474) (#244)

    2149c60
  12. 8 remaining items

  13. github-actions
    added a commit that references this issue on Sep 15, 2022

    chore(main): release 2.2.5 (#245)

    3aede67
  14. github-actions
    added 6 commits that reference this issue on Sep 30, 2022

    chore(main): release 2.3.6-SNAPSHOT (#244)

    342e0d5

    chore(main): release 0.7.5 (#239)

    5347464

    chore(main): release 1.3.7 (#257)

    b3e3ae9

    chore(main): release 1.4.3 (#244)

    1abee22

    chore(bazel): update protobuf to v3.21.7 (#244)

    55a2b2c

    chore(deps): update dependency com.google.cloud:google-cloud-gke-conn…

    367319c
  15. github-actions
    added a commit that references this issue on Nov 9, 2022

    build(deps): update dependency com.google.cloud:google-cloud-shared-c…

    06fe240
  16. chingor13
    added a commit that references this issue on Jan 6, 2026

    build(java): use actions/github-script v3 tag rather than full semver (…

    1dfce87
  17. chingor13
    added 2 commits that reference this issue on Jan 22, 2026

    deps: update dependency com.google.oauth-client:google-oauth-client t…

    b984e36

    chore: release 1.105.1 (#221)

    3939f32
  18. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(ci): fix typo in restrict presubmit samples ITs to only snapshot (

    2ef8f89
  19. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    deps: update autovalue.version to v1.7.3 (#244)

    6af6682

    deps: update autovalue.version to v1.7.3 (#244)

    8b00c4b
  20. benjaminp
    added a commit that references this issue on Jul 13, 2026

    deps: update dependency com.google.guava:guava-bom to v29 (googleapis…

    c618f4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

🚨 criticalP0 critical issue. Requires immediate fixtriage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.