Message size limit in slash

I have a problem when querying slash and receiving a large amount of data. This problem does not manifest when I host my own dgraph.

I’ve written a small tool to demonstrate the problem:

  • Local dgraph (20.07.1 shuri-1), default message size: errors as expected.
$ go run main.go normal localhost:9080
wrote root at: 0x3934d
panic: cannot query: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (5000232 vs. 4194304)
  • Local dgraph (20.07.1 shuri-1), allow huge messages: works as expected.
$ go run main.go huge localhost:9080
wrote root at: 0x39359
got bytes of json: 5000153
queried successfully
  • Slash dgraph (v20.07.1-rc1-27-g7f636633), default message size: errors as expected.
$ go run main.go normal sable-account.grpc.eu-central-1.aws.cloud.dgraph.io:443 REDACTED
wrote root at: 0x10
panic: cannot query: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (5000230 vs. 4194304)
  • Slash dgraph (v20.07.1-rc1-27-g7f636633), allow huge messages: doesn’t work.
$ go run main.go huge sable-account.grpc.eu-central-1.aws.cloud.dgraph.io:443 REDACTED
wrote root at: 0x17
panic: cannot query: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (5000230 vs. 4194304)

In production I’m currently running queries that can return in excess of 100MiB of JSON results (lots of small snippets of data, nothing like the monster strings in the example); paginating, or otherwise rewriting the queries, is… probably possible, but I’m really hoping for a quick fix to bring hosted behaviour in line with self-hosted :wink:.

I ran into this issue too. My solution was to break things up into batches of data less than 4MB. This is clearly less than ideal in your case, so I will change this to a feature request.

p/s: welcome to the dgraph community. We hope you come for the solutions, stay for the wholesome.

1 Like

We’ll take a look here. Something is definitely truncating the request, which might be the nginx or proxy we have. I’ll mark this as accepted.

1 Like

Just wondering – is there somewhere else I should go to see the status of this work, since the github issue tracker is deprecated?

This thread is the issue tracker. Could @gja provide some updates?

We’ve. been working on this one, but it needed us to rewrite a good chunk of Slash GraphQL we should have this fixed in a week or two.

Just to say – sorry I didn’t spot the notification, but many thanks for doing this: it’s greatly appreciated.

Hello,

Any update on this? I faced the same issue today on DGraph Cloud endpoint. Using the following didnt work:

let options = { ‘grpc.max_receive_message_length’: 1024 * 1024 * 1024 };

Though above config worked on DGraph on-premise.