Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent gRPC StatusCode.UNAVAILABLE errors #2693

Closed
rishsriv opened this issue Nov 5, 2016 · 3 comments
Closed

Frequent gRPC StatusCode.UNAVAILABLE errors #2693

rishsriv opened this issue Nov 5, 2016 · 3 comments
Assignees
Labels
api: datastore Issues related to the Datastore API. grpc

Comments

@rishsriv
Copy link

rishsriv commented Nov 5, 2016

Of late, a small but significant (5-10%) of fetch operations to the Cloud Datastore seem to fail. They always succeed upon retry (which seems to be the prescribed way to solve the problem). However, the library should handle the retries IMO.

Here is the error traceback:

Traceback (most recent call last):
  File "/path/to/file.py", line 22, in get_client_id_dets
    res = list(query.fetch())
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/query.py", line 463, in __iter__
    self.next_page()
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/query.py", line 434, in next_page
    transaction_id=transaction and transaction.id,
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/connection.py", line 538, in run_query
    response = self._datastore_api.run_query(project, request)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/connection.py", line 280, in run_query
    return self._stub.RunQuery(request_pb)
  File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 481, in __call__
    return _end_unary_response_blocking(state, False, deadline)
  File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 432, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
_Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.UNAVAILABLE, {"created":"@1478303817.915316389","
description":"Secure read failed","file":"src/core/lib/security/transport/secure_endpoint.c","file_line":157,"grpc_
status":14,"referenced_errors":[{"created":"@1478303817.915244674","description":"EOF","file":"src/core/lib/iomgr/t
cp_posix.c","file_line":235}]})>

I'm using Ubuntu 16.04 on Google Compute Engine, with python 2.7.12 and google cloud version 0.20. I am making the request from a compute instance in the Asia region.

@daspecster daspecster added the api: datastore Issues related to the Datastore API. label Nov 5, 2016
@daspecster
Copy link
Contributor

daspecster commented Nov 5, 2016

@rishsriv thanks for reporting!

There has been talk of adding retry with exponential backoff to the library.
Most recently, #2684 (comment).

I would suggest using exponential backoff with your favorite Python retry library for now.

There are a couple that seem to be alright.

Also, I created #2694 to track where retry is needed and most helpful and design the interface.

@rishsriv
Copy link
Author

rishsriv commented Nov 5, 2016

@daspecter, thanks for the update!

@rishsriv rishsriv changed the title Frequent StatusCode.UNAVAILABLE errors while fetching from Cloud Datastore Frequent gRPC StatusCode.UNAVAILABLE errors Nov 7, 2016
@dhermes
Copy link
Contributor

dhermes commented Nov 7, 2016

Closing as a dupe of #2683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. grpc
Projects
None yet
Development

No branches or pull requests

3 participants