Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

StatusCode.UNAVAILABLE OS Error: Error received from peer #54

Open
modenl opened this issue May 30, 2019 · 5 comments
Open

StatusCode.UNAVAILABLE OS Error: Error received from peer #54

modenl opened this issue May 30, 2019 · 5 comments

Comments

@modenl
Copy link
Contributor

modenl commented May 30, 2019

I am experiencing this error in the new version(0.3.3) which used the same grpc channel over longer period of time:
grpc/grpc#16515
No repro with 0.2.5 which I used new grpc channel for every call.

@willcl-ark
Copy link
Owner

Hello @modenl, sorry to hear that. I am not able to reproduce my side, do you have any logs or steps that I could take to try and see what might be happening?

Reading through that issue looks like many commenters actually had other network issues, do you suspect that something like this was not contributing to your problem?

Failing that I could also try a branch which increased the channel connectivity polling rate as per the other commenter in that thread, and see if that helps solve your issue.

The channel is monitored by grpc package every 5 seconds, the channel monitoring introduced in lnd_grpc is actually to stimulate regeneration of the stub (not strictly necessary) when the channel goes stale, and is then (hopefully) reconnected. This is to help during WalletUnlock stage, after which LightningServicer becomes available, but seems to trip up if the stub is created before the service is online.

@modenl
Copy link
Contributor Author

modenl commented Jun 6, 2019

Another related issue:
grpc/grpc#11043
My observation is that it happens after idle for couple hours. I don't know why that 5 seconds grpc connectivity check doesn't work.
My workaround is to open and close channel for every rpc call.

@modenl
Copy link
Contributor Author

modenl commented Sep 12, 2019

More related issue: grpc/grpc#10684 (comment)
Example of how to handle retry: https://www.programcreek.com/python/example/95429/grpc._channel

@modenl
Copy link
Contributor Author

modenl commented Oct 16, 2019

I've confirmed that the grpc client will be disconnected by grpc server after idling for couple minutes. Adding retry once logic worked around for me.

@willcl-ark
Copy link
Owner

Thanks @modenl. Is is something that you can make a PR out of?

@modenl modenl mentioned this issue Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants