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

grpc: trying to send message larger than max (5380006 vs. 4194304) #21

Closed
janmoller opened this issue Jan 18, 2019 · 4 comments
Closed

Comments

@janmoller
Copy link

Subject of the issue

When using LightningGrpc.LightningBlockingStub and calling describeGraph() I get an exception from grpc:
io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: grpc: trying to send message larger than max (5380006 vs. 4194304)
This used not to be a problem and worked nicely say a month ago, but now that the lightning network has grown the return value is larger than 4 MB, 4194304 bytes.

I have tried to call withMaxInboundMessageSize() and withMaxOutboundMessageSize() with values that would allow 104857600 bytes (100 MB), but this has no effect, the exception remains the same.
I have also called maxInboundMessageSize() on the ManagedChannel that LightningGrpc.newBlockingStub() is based on with no effect.

Your environment

  • version of lightningj: org.lightningj:lightningj:0.5.1-Beta
  • version and vendor of JDK: openjdk version "1.8.0_191"
  • your operationg systems. CentOs

Steps to reproduce

Create an instance of LightningBlockingStub and call describeGraph() while connected to a lnd node connected to the lightning network

Expected behaviour

I expect a ChannelGraph reflecting the lightning network as seen by the lnd node

Actual behaviour

I get an exception: io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: grpc: trying to send message larger than max (5379814 vs. 4194304)

@herrvendil
Copy link
Contributor

Hi

I think the problem is in the LND node, see PR lightningnetwork/lnd#2374 by roasbeef. LND have increased the limit to 50 mb in latest master.

If it is a big problem for you I could try to generate a new pre-release of lightningJ built from latest master.

Regards
Philip

@janmoller
Copy link
Author

Can confirm that I had to both:

  1. upgrade lnd (to master, no release tagged after the fix), otherwise it wouldn't send messages larger than 4MB (for descibegraph)
  2. configure maxInboundMessageSize() in my code, so LightningGrpc.LightningBlockingStub would accept messages larger then 4MB
    Now it works.
    Thanks a lot.

@herrvendil
Copy link
Contributor

Great to hear it works for you now.

I will probably create helper methods so it is easy to configure maxInboundMessageSize in the next version for 0.5.2 when released by LND. There seems to be alot of new GRPC apis coming up shortly in LND so there will be quite a lot to fix in lightningj library for to support 0.5.2.

@herrvendil
Copy link
Contributor

Hi again

Just wanted to inform you that I've release 0.5.2-beta-rc3 where maxInboundMessageSize is by default increased to 50Mb (same as LND in 0.5.2). Should be in maven central shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants