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 "", line 21, in <module>
  File "", line 12, in query
    res = client.txn(read_only=True).query(query)
  File "/usr/lib/python2.7/site-packages/pydgraph/", line 62, in query
    return self.do_request(req, timeout=timeout, metadata=metadata, credentials=credentials)
  File "/usr/lib/python2.7/site-packages/pydgraph/", line 110, in do_request
  File "/usr/lib/python2.7/site-packages/pydgraph/", 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:","file":"src/core/lib/surface/","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.