-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
On Android, ManagedChannel is no more reusable (10 requests max with 1 request per second) #10572
Comments
The error indicates that the endpoint has received a HEADERS frame that caused its concurrent stream limit to be exceeded. It is surprising to me that the limit is only 10. Are you reading the returned values from the future or just letting the results accumulate? |
In order to exclude a problem with my implementation (Android <-> Linux C++), I reproduced the behavior with the examples provided by grpc-java Android java 1.58.0 and grpc python 1.58.0. On client side, I have the issue with Android platform only, not the java desktop version. If I switch to version 1.46.1, the ManagedChannel manages the connection well. What I do on RouteGuide example is to click each second on the button "Get Feature". |
The 10 is probably because Python limits the number of workers to 10 in the example. |
@temawi, this does line up with the upgrades to appcompat. Seems that should have been low-risk. I wonder if the Android libraries changed something that means RPCs aren't getting closed now when they previously were. |
I just tried running the 1.58.0 Android route guide client against 1.58.0 Go server and no amount of clicking is reproducing the problem. This seems to point the finger at the Python server. @eltanardo maybe you can confirm you also see the same thing? Getting a Go server running is straightforward, after installing Go:
The server will run on port 50051
|
@temawi , using |
@eltanardo v1.46.1 is old at this point, why did you use that version? Can you reproduce it with 1.58.0 client and 1.58.0 Go server? |
No updates on this one so maybe the issue got resolved? I will close this but it can be reopened if further discussion is needed. |
What version of gRPC-Java are you using?
1.58.0
What is your environment?
- Client side
RouteGuide example for Android, tagged v1.58.0
Tested with Android 9 to Android 13
- Server side
RouteGuide server example from grpc python tagged v1.58.0, linux
What did you expect to see?
I expect to be able to reuse the same ManagedChannel for each grpc call
What did you see instead?
After approximately 10 requests in 10 seconds, the channel is no more usable. I have to "exit router guide" then "start router guide", because the channel is no more usable
- On Android client side
Steps to reproduce the bug
Launch RouteGuide
Enter server host and port
"start route guide"
Click 1 time per second on "Get Feature".
With grpc-java version from v1.29.0 to v1.46.1, it works. Above version v1.46.1, it fails
- On Linux Python server side
No error
The text was updated successfully, but these errors were encountered: