-
Notifications
You must be signed in to change notification settings - Fork 101
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
Cloud Spanner throw Auth error:Error: read ECONNRESET intermittently #118
Comments
It sounds like you might need to write some retry logic around the code that's causing problems. But to be sure there's not anything we can do, can you show the code that calls the method which is returning the error? |
But this does not look like an error that users should be seeing. We do not want users to be retrying operations. If the error is retryable, then the library should retry it. |
@manasi99 could you put together a minimal amount of code that reproduces this issue for us? That should help us resolve this issue for you quickly. |
@stephenplusplus @callmehiphop : This is the simple version of actual code where the error is caught in catch block:
|
This has been addressed by a dependency, google-auth-library: googleapis/google-auth-library-nodejs#283. It won't be pulled in automatically, however, we are still determining our game plan to get it out (stephenplusplus/google-auto-auth#39). I'll mark this as blocked, but hopefully not for long. |
We are also seeing these "Auth error:Error: read ECONNRESET" errors in our Cloud Function environment which utilizes Spanner. Since our setup is too complex we were running different narrowed down versions of our code and trying this patch to understand if it is caused by something on our part or a more general Cloud issue. Now that we noticed this issue, at least let me show some of our logs. All of the below logs belong to the same function execution_id but we have a similar pattern in many other calls:
What is interesting is that we are getting these Auth errors 50 minutes after the original request is already completed successfully. Although |
This should be resolved now, as we have upgraded to the latest google-auth-library via google-auto-auth. To pull in the changes, just un- and re-install |
Thanks. We'll test it immediately. |
I have a cloud function deployed on GCP which is triggered by Cloud Pub/Sub topic. It connects to cloud spanner to insert the pub/sub event data. It is a high volume pub/sub topic and make simultaneous insert requests in different cloud spanner table. However, it keep giving below errors intermittently. Application Default Credentials are used to do authentication of Cloud Spanner.
ERROR: { Error: Getting metadata from plugin failed with error: read ECONNRESET at /user_code/node_modules/@google-cloud/spanner/node_modules/grpc/src/client.js:554:15 code: 16, metadata: Metadata { _internal_repr: {} }, note: 'Exception occurred in retry method that was not classified as transient' }
Below are the dependencies in package.json
Environment details
The text was updated successfully, but these errors were encountered: