Resource exhausted exception

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.

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.

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?

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.

You could try to use pagination, it can be very useful.

PS. Can you show you query?

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
              }   }
        }
    }
}

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

2 Likes

@deepak: Can you have a look at this?