Count query gives error in pydgraph

Moved from GitHub pydgraph/147

Posted by OmarAyo:

Did someone face this error message while running a similar query:

query = """{
  nodeCount(func: has(<containers>)) {
    nodeCount: count(uid)
  }
}
"""

The error is:

Traceback (most recent call last):
  File "dgraph_statistics.py", line 21, in <module>
    query(client)
  File "dgraph_statistics.py", line 12, in query
    res = client.txn(read_only=True).query(query)
  File "/usr/lib/python2.7/site-packages/pydgraph/txn.py", line 62, in query
    return self.do_request(req, timeout=timeout, metadata=metadata, credentials=credentials)
  File "/usr/lib/python2.7/site-packages/pydgraph/txn.py", line 110, in do_request
    self._common_except_mutate(query_error)
  File "/usr/lib/python2.7/site-packages/pydgraph/txn.py", line 160, in _common_except_mutate
    raise error
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = ": rpc error: code = ResourceExhausted desc = grpc: message too large (14097132966 bytes)"
	debug_error_string = "{"created":"@1590593574.323725933","description":"Error received from peer ipv4:10.200.133.39:9080","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":": rpc e

Note: not using latest version of pydgraph

martinmr commented :

Closing this issue as the issue is with the grpc message limit in Dgraph not the client.