Skip to content

google cloud spanner is closing connection #2049

Description

@aronsuarez

I running my api based on swagger and node.

When my api is running for few minutes without a request and then i send an api request to it, I got this error:

{ Error: {"created":"@1488097564.272436000","description":"Delayed close due to in-progress write","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":406,"grpc_status":14,"referenced_errors":[{"created":"@1488097564.272434000","description":"Endpoint read failed","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1851,"occurred_during_write":1,"referenced_errors":[{"created":"@1488097564.272350000","description":"Secure read failed","file":"../src/core/lib/security/transport/secure_endpoint.c","file_line":166,"referenced_errors":[{"created":"@1488097564.272347000","description":"Socket closed","fd":24,"file":"../src/core/lib/iomgr/tcp_posix.c","file_line":249,"target_address":"ipv4:172.217.19.10:443"}]}]}]}
    at ClientReadableStream._emitStatusIfDone (/Users/aronsuarez/Code/asate/admin-apis/wiki-admin-api/node_modules/grpc/src/node/src/client.js:201:19)
    at ClientReadableStream._readsDone (/Users/aronsuarez/Code/asate/admin-apis/wiki-admin-api/node_modules/grpc/src/node/src/client.js:169:8)
    at readCallback (/Users/aronsuarez/Code/asate/admin-apis/wiki-admin-api/node_modules/grpc/src/node/src/client.js:242:12) code: 14, metadata: Metadata { _internal_repr: {} } }

I think google spanner is closing the connection, why and how can prevent it from to that?

The only way that i see in the docs is to send periodically a SELECT 1 request to spanner.

Is this correct?

System Info:
node. 6.10.0
os: macOS latest
package: latest

Thanks for help

Activity

  1. vkedia commented on Mar 6, 2017

    @vkedia
    Contributor

    You should not need to periodically sent Select 1 to spanner. This seems like underlying socket closing.
    @callmehiphop @stephenplusplus Any ideas whats going on here.

  2. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Mar 6, 2017
  3. callmehiphop commented on Mar 6, 2017

    @callmehiphop
    Contributor

    Possibly related to #2039

  4. jmuk commented on Mar 7, 2017

    @jmuk
    Contributor

    @murgatroid99 any ideas about grpc options in this situation?

  5. added
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Mar 7, 2017
  6. vkedia commented on Mar 20, 2017

    @vkedia
    Contributor

    Any updates on this?

  7. murgatroid99 commented on Mar 21, 2017

    @murgatroid99

    Actually, we just released gRPC 1.2.0, which should fix this problem

  8. lukesneeringer commented on Mar 21, 2017

    @lukesneeringer
    Contributor

    Closing as fixed in GRPC.

  9. aronsuarez commented on Mar 22, 2017

    @aronsuarez
    Author

    @lukesneeringer @murgatroid99 I have tested with the "@google-cloud/spanner" - 0.1.2 package for node and it dosen't work. This is the error

    (node:74588) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: {"created":"@1490192388.326156000","description":"Transport closed","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1072}

  10. lukesneeringer commented on Mar 22, 2017

    @lukesneeringer
    Contributor

    What version of GRPC do you have installed?

  11. aronsuarez commented on Mar 22, 2017

    @aronsuarez
    Author

    How can i check this, i have only installed the spanner package for node.

    Version 0.1.2

  12. lukesneeringer commented on Mar 22, 2017

    @lukesneeringer
    Contributor

    npm list | grep grpc

  13. aronsuarez commented on Mar 22, 2017

    @aronsuarez
    Author

    Version 1.1.2, this is the problem, i think this is installed with the spanner package correct?

  14. lukesneeringer commented on Mar 22, 2017

    @lukesneeringer
    Contributor

    The Spanner package uses ^ to tag its dependencies; grpc is a dependency of @google-cloud/[email protected], and a new install correctly installs grpc 1.2.0.

    Basically: Update your dependencies. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the Spanner API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions