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

UNAVAILABLE: HTTP/2 error code: NO_ERROR Received Goawaysession_timed_out #5855

Closed
ghost opened this issue Jun 8, 2019 · 6 comments · Fixed by #7502
Closed

UNAVAILABLE: HTTP/2 error code: NO_ERROR Received Goawaysession_timed_out #5855

ghost opened this issue Jun 8, 2019 · 6 comments · Fixed by #7502
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Jun 8, 2019

What version of gRPC are you using?

I have no idea, this is coming from Google Firebase.

What did you expect to see?

No error

This is the callstack:
java.util.concurrent.ExecutionException: com.google.api.gax.rpc.UnavailableException: io.grpc.StatusRuntimeException: UNAVAILABLE: HTTP/2 error code: NO_ERRORReceived Goawaysession_timed_out at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:500) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:479) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:76) at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:62)

This is my lines of code that triggered this
ApiFuture future = db.collection(collection).document(doc).set(fsData, SetOptions.merge());
future.get();

This is working most of the time, it happened only twice so far so maybe it's something temporary but I have no idea what it is and how to overcome this.

Please advice

@ejona86
Copy link
Member

ejona86 commented Jun 20, 2019

This mainly happens when Google servers are doing things like shutting down or balancing load. It generally has nothing to do with client behavior.

@ghost
Copy link
Author

ghost commented Jun 20, 2019

And do I have something to do about it from my side?

@ejona86
Copy link
Member

ejona86 commented Jun 24, 2019

@amosss, no, there's nothing to be done from your side, other than recognizing in general that RPCs may fail.

I'm thinking now this may be a local race. I'm going to try to change the code to give the local race a different error.

The error message may also be misreported due to MAX_CONCURRENT_STREAMS. @amosss, how many RPCs might you do concurrently? Over 100?

@ghost
Copy link
Author

ghost commented Jun 24, 2019

I don't think I reached 100 concurrent requests...

@ejona86
Copy link
Member

ejona86 commented Jun 24, 2019

@amosss, okay, it can still be the local race. It's just that you have to get "unlucky" for that. Basically, it requires you to try to send an RPC and that RPC to be between two threads (in a queue) when it's learned a Google server is shutting down. We check that the connection is good before putting it into the queue, and we know the other thread will process the queue quickly, but it may take a small amount of time.

@ejona86
Copy link
Member

ejona86 commented Jun 25, 2019

For completeness, #2562 is the issue for the local race. Keeping this open to change the error message so it is obvious when hitting the local race.

@ejona86 ejona86 added this to the Next milestone Jun 27, 2019
ejona86 added a commit to ejona86/grpc-java that referenced this issue Oct 9, 2020
With this, it will be clear if the RPC failed because the server didn't
use a double-GOAWAY or if it failed because of MAX_CONCURRENT_STREAMS or
if it was due to a local race. It also fixes the status code to be
UNAVAILABLE except for the RPCs included in the GOAWAY error (modulo the
Netty bug).

Fixes grpc#5855
ejona86 added a commit to ejona86/grpc-java that referenced this issue Oct 29, 2020
With this, it will be clear if the RPC failed because the server didn't
use a double-GOAWAY or if it failed because of MAX_CONCURRENT_STREAMS or
if it was due to a local race. It also fixes the status code to be
UNAVAILABLE except for the RPCs included in the GOAWAY error (modulo the
Netty bug).

Fixes grpc#5855
ejona86 added a commit that referenced this issue Oct 29, 2020
With this, it will be clear if the RPC failed because the server didn't
use a double-GOAWAY or if it failed because of MAX_CONCURRENT_STREAMS or
if it was due to a local race. It also fixes the status code to be
UNAVAILABLE except for the RPCs included in the GOAWAY error (modulo the
Netty bug).

Fixes #5855
@ejona86 ejona86 modified the milestones: Next, 1.34 Dec 3, 2020
dfawley pushed a commit to dfawley/grpc-java that referenced this issue Jan 15, 2021
With this, it will be clear if the RPC failed because the server didn't
use a double-GOAWAY or if it failed because of MAX_CONCURRENT_STREAMS or
if it was due to a local race. It also fixes the status code to be
UNAVAILABLE except for the RPCs included in the GOAWAY error (modulo the
Netty bug).

Fixes grpc#5855
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant