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 "socket closed" service exception still occurring #5918

Closed
meredithslota opened this issue Mar 2, 2023 · 10 comments
Closed

gRPC "socket closed" service exception still occurring #5918

meredithslota opened this issue Mar 2, 2023 · 10 comments
Assignees
Labels
api: firestore Issues related to the Firestore API. grpc priority: p2 Moderately-important priority. Fix may not be included in next release.

Comments

@meredithslota
Copy link

meredithslota commented Mar 2, 2023

Hey there @saranshdhingra could you share what OS you're running on and what version of the gRPC library you're using where you do not see the "socket closed" issue? I'm inclined to think this is an issue in the network stack below gRPC or perhaps how gRPC is interacting with the native network stack.

We are running on Ubuntu 18.04 with gRPC v1.28.1 and see this issue with some frequency (on the order of 10s of minutes during a long-lived bi-directional streaming connection).

I'm curious if this issue was solved or if it just did not repro in your environment and hence was closed? Thanks!

Originally posted by @jaryder in #2427 (comment)

@meredithslota meredithslota changed the title gRPC service "socket closed" service exception still occurring gRPC "socket closed" service exception still occurring Mar 2, 2023
@jaryder
Copy link

jaryder commented Mar 3, 2023

To clarify, the issue I described is happening in the gRPC client. Thanks!

@lukasgit
Copy link

lukasgit commented Mar 3, 2023

@meredithslota this issue is still ongoing and it's important to let others follow the original thread here #2427

@yash30201 yash30201 added api: firestore Issues related to the Firestore API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Mar 6, 2023
@meredithslota
Copy link
Author

@lukasgit Apologies for the confusion; the linked issue #2427 was marked closed by @saranshdhingra back in April 2022 and I didn't want the last comment to be lost. It's cross-referenced so that previous repro information can still be useful, but if you have current repro steps, please include them here. Thanks!

@bcoe
Copy link
Contributor

bcoe commented Mar 27, 2023

@saranshdhingra could you help triage this issue, it is out of SLO.

@saranshdhingra
Copy link
Contributor

@bcoe @meredithslota I will try to look into this issue this week. It's been a bit difficult to replicate it.
I'll try to find the last environment setup I had for this and continue from there.

Thanks a lot for your patience on this @lukasgit

@vishwarajanand vishwarajanand added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Mar 30, 2023
@vishwarajanand
Copy link
Contributor

vishwarajanand commented Mar 30, 2023

Reduced priority since it doesn't block shipping releases.

@saranshdhingra saranshdhingra added the status: investigating The issue is under investigation, which is determined to be non-trivial. label Apr 3, 2023
@shivgautam
Copy link
Contributor

@saranshdhingra - Did we find anything on this issue?

@huyhoangle86
Copy link

I got both issue, "socket closed " and "go away " in python grpc server side. seems like nothing has been resolved lately

@saranshdhingra
Copy link
Contributor

So, I am not really sure how I can proceed with this issue as I have not been able to replicate it.

Given that it's a response given by the backend APIs, all we can do at the Client Library's front is retry it, which we are doing.

If someone, can find an instance where the UNAVAILABLE code is not leading to a retry, then I would certainly try to dig deeper. I have tested the retry functionality and that seems to be working as intended.

For anyone who wants to control the retry logic can use the grpcRetryFunction option when they make API calls and test if the retry is in fact happening or not.

But, if there is something at the GRPC extension/product API level, I am afraid, the conversation needs to happen in the respective repository.

After all this while, not being able to give a concrete answer to this is not what I had hoped, but this is the best I can say when I haven't been able to replicate it.

I will be closing this for now, but if anyone encounters an instance where the library doesn't retry in the case where it is supposed to, please reopen this, I would certainly look into it.

@saranshdhingra saranshdhingra added grpc and removed status: investigating The issue is under investigation, which is determined to be non-trivial. labels Aug 8, 2023
@wazelin
Copy link

wazelin commented May 13, 2024

A similar issue sporadically occurs when using Bigtable client, @saranshdhingra.

throw(/var/www/html/vendor/google/gax/src/ServerStream.php:84)
Google\ApiCore\ApiException.__construct(/var/www/html/vendor/google/gax/src/ApiException.php:267)
Google\ApiCore\ApiException.create(/var/www/html/vendor/google/gax/src/ApiException.php:148)
Google\ApiCore\ApiException.createFromStdClass(/var/www/html/vendor/google/gax/src/ServerStream.php:84)
Google\ApiCore\ServerStream.readAll(/var/www/html/vendor/google/cloud-bigtable/src/ResumableStream.php:100)
Google\Cloud\Bigtable\ResumableStream.readAll(/var/www/html/vendor/google/cloud-bigtable/src/ChunkFormatter.php:168)
Google\Cloud\Bigtable\ChunkFormatter.readAll
Generator.current(/var/www/html/vendor/google/cloud-bigtable/src/Table.php:331)
Google\Cloud\Bigtable\Table.readRow(/var/www/html/vendor/oat-sa/bundle-bigtable-document-manager/Driver/BigtableDocumentDriver.php:86)

I'm not entirely sure if it should be like that, but I'm guessing the problem could be addressed by adding the same retry mechanism configuration to this piece of configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. grpc priority: p2 Moderately-important priority. Fix may not be included in next release.
Projects
None yet
Development

No branches or pull requests

10 participants