Resource exhausted exception


(Thej Kamal Rao Menneni) #1

I am running a query using dgraph java client and getting following exception

io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: io.grpc.netty.NettyClientTransport$3: Frame size 4306680 exceeds maximum: 4194304

Above exception thrown when query includes too many results.


(Michel Conrado (Support Engineer)) #2

It would be interesting to introduce you step by step of why this happened. Only error does not help to understand the reasons.

If you try to execute this query in Ratel gives the same error?

There is no way you consume it in batches? Of course, if that’s the case.

Cheers.


(Thej Kamal Rao Menneni) #3

Thank you Michel for the response. I have tried multiple times in Ratel as well, many times it showed ‘fetching result’ for a while and then became unresponsive but after several attempts I did get result in few cases in Ratel.

Few times I got follwing i/o timeout error

"code": "ErrorInvalidRequest",

I will check if I can run it in multiple batches but I am afraid what happens if I get same response for cases when we need result in a single query.

When does this happens, when we query for too many nodes or due to query complexity?

Also I would like to know whether there is any end point to check cluster configuration?


(Michel Conrado (Support Engineer)) #4

In my view should return what you need. But it depends a lot on understanding what goes on in your query.

Everything you need to analyze the status of your cluster should appear in Dgraph Zero.
https://docs.dgraph.io/deploy/#more-about-dgraph-zero

You could try to use pagination, it can be very useful.
https://docs.dgraph.io/query-language/#pagination

PS. Can you show you query?


(Thej Kamal Rao Menneni) #5

Thank you for the response @MichelDiz

Following is my query

{
    find_all_related_profiles_for_given_person(func: eq(person_name, "PERSON1")){
        ~belongs_to {
    				profile_id
            post_value @facets(ge(score, 1)){
               belongs_to{
                person_name
              }  
            }
            user_name @facets(ge(score, 1)){
               belongs_to{
                person_name
              }   }
           email @facets(ge(score, 1)){
               belongs_to{
                person_name
              }   }
        }
    }
}

(护群神兽之点赞狂魔) #6

The response data is too big . you need limit your query.


(Manish R Jain) #7

@deepak: Can you have a look at this?