@google-cloud/spannerError: Session not found: projects/bt-bsp/instances/test-instance-asia/databases/test/sessions/AOJoGSnIR9eLi-hXzRBqrp0ufJKnafwK7FvtRcOo8Zn2ac1WgqUGx_IqQlbi
at ClientReadableStream._emitStatusIfDone (/root/breaktime-bsp-api/node_modules/grpc/src/node/src/client.js:201:19)
at ClientReadableStream._readsDone (/root/breaktime-bsp-api/node_modules/grpc/src/node/src/client.js:169:8)
at readCallback (/root/breaktime-bsp-api/node_modules/grpc/src/node/src/client.js:242:12)
I tried to search this error message on Google but get nothings. I think this problem isn't make by Spanner client but happen when I use it.
Thanks!
This issue only happen when keep connection long time and not using.
This can happen if the session is not in use for an hour. But the client library is supposed to keep the sessions alive by periodically pinging them. So you should not see this error ideally.
@stephenplusplus @callmehiphop Can you please see if there is some bug in the keep alive implementation.
Hi - still experiencing this issue with long lived sessions. Getting the following error message:
{ Error: Session not found:
projects/aws/instances/inst/databases/db/sessions/AMQ1qflJAH4QySFTon]...
at ClientReadableStream._emitStatusIfDone
(/usr/src/app/node_modules/grpc/src/node/src/client.js:201:19) at
ClientReadableStream._receiveStatus (/usr/src/app/node_modules/grpc/src/node/src/client.js:180:8)
at /usr/src/app/node_modules/grpc/src/node/src/client.js:592:14
@callmehiphop is this possibly address in #2313?
@stephenplusplus @callmehiphop Any updates on this?
According to the docs, the keepAlive option has no default parameter. So you probably want to do something like this
const db = instance.database(databaseId, { keepAlive: 5 }); // pings Spanner every 5 minutes
Be aware not to create a new connection for each request though!
@chown9835 @stephenthoma is this still something you are seeing?
Closing this issue since #2313 should address this. Feel free to reopen if the problem persists!
Hello
We are still seeing this exact error. It seems to happen every one hour so it really fits the definition given here.
We create each connection with keepAlive option, but it does not seem to be working.
The version of the library we are using is 1.4.1
We are updating it to 2.0.0 in the near future but any help with is error will be appreciated.
Created a new issue: #2874
Thanks
Most helpful comment
This can happen if the session is not in use for an hour. But the client library is supposed to keep the sessions alive by periodically pinging them. So you should not see this error ideally.
@stephenplusplus @callmehiphop Can you please see if there is some bug in the keep alive implementation.