Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clientv3: configure grpc.MaxCallSendMsgSize, grpc.MaxCallRecvMsgSize #9043

Closed
2 tasks done
gyuho opened this issue Dec 19, 2017 · 0 comments
Closed
2 tasks done

clientv3: configure grpc.MaxCallSendMsgSize, grpc.MaxCallRecvMsgSize #9043

gyuho opened this issue Dec 19, 2017 · 0 comments
Milestone

Comments

@gyuho
Copy link
Contributor

gyuho commented Dec 19, 2017

For server-side, etcd --max-request-bytes must be configured--defaults to 1.5MB.

v3.2

https://github.com/coreos/etcd/blob/1fa227da71556c77f083ebfdccd1e298e4d1bf65/embed/config.go#L44

v3.3+

https://github.com/coreos/etcd/blob/b0a7623be82c332942994ac2a09c70d930ebbb77/embed/config.go#L50

External projects can configure this with embed.NewConfig().MaxRequestBytes = 5 * 1024 * 1024.


For client-side, gRPC remote calls must be configured with grpc.MaxCallSendMsgSize and grpc.MaxCallRecvMsgSize that correspond to the server setting.

kubernetes/kubernetes#51099 happen when these two parameters do not match.


Another problem in etcd-side, clientv3 was not setting request call limit, thus defaulting to 4MB (clients can only receive <4MB response).

So even with etcd --max-request-bytes 5.5MB(default value), client requests with 5MB data will fail with rpc error: code = ResourceExhausted desc = grpc: received message larger than max (56710706 vs. 4194304).

TODO

  • let users configure client-side request limit, or just set grpc.MaxCallSendMsgSize(math.MaxInt32), grpc.MaxCallRecvMsgSize(math.MaxInt32) to all API calls, since server would return errors anyway.
  • backport this patch with v3.2.12

Reference: kubernetes/kubernetes#57160 (comment)

/cc @jpbetz @xiang90

@gyuho gyuho added this to the v3.3.0 milestone Dec 19, 2017
gyuho added a commit to gyuho/etcd that referenced this issue Dec 19, 2017
Address etcd-io#9043.
Won't fix it, but we need test coverage on response back
from server as well.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
gyuho added a commit to gyuho/etcd that referenced this issue Dec 19, 2017
Address etcd-io#9043.
Won't fix it, but we need test coverage on response back
from server as well.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
gyuho added a commit that referenced this issue Dec 20, 2017
Address #9043.
Won't fix it, but we need test coverage on response back
from server as well.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant