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

No query with id 'XXX' found probably expired session #9012

Closed
VincentMarrec opened this issue Sep 13, 2019 · 15 comments
Closed

No query with id 'XXX' found probably expired session #9012

VincentMarrec opened this issue Sep 13, 2019 · 15 comments

Comments

@VincentMarrec
Copy link

OrientDB Version: 3.0.22

Java Version: 1.8

OrientJS Version: 3.0.1

NodeJS Version: 12.10.0

OS: Linux

Expected behavior

The request should execute without failing and throwing an error because of the session.

Actual behavior

I currently use the pool.acquire() as specified in the docs : http://orientdb.com/docs/3.0.x/orientjs/OrientJS.html#pooled-sessions
and I use the session I just obtained to query a "small" amount of verticies ~300.
Here's my query : return await session.query("select from ClassName").all().
This is called in an async function.
But this query fails (sometimes), and it gives this error :
child [OrientDB.RequestError]: No query with id 'idnumber' found probably expired session DB name="dbname" at child.Operation.parseError (/dist/node_modules/orientjs/lib/client/network/protocol37/operation.js:1224:13) at child.Operation.consume (/dist/node_modules/orientjs/lib/client/network/protocol37/operation.js:566:35) at ONetworkConnection.Connection.process (/dist/node_modules/orientjs/lib/client/network/conn.js:460:17) at ONetworkConnection.Connection.handleSocketData (/dist/node_modules/orientjs/lib/client/network/conn.js:342:20) at Socket.emit (events.js:209:13) at addChunk (_stream_readable.js:305:12) at readableAddChunk (_stream_readable.js:286:11) at Socket.Readable.push (_stream_readable.js:220:10) at TCP.onStreamRead (internal/stream_base_commons.js:182:23) { name: 'OrientDB.RequestError', message: "No query with id 'idnumber' found probably expired session\r\n" + '\tDB name="dbname"', data: {}, isMVCC: [Function], isTokenException: [Function], previous: [], code: 5, identifier: 0, id: 1, type: 'com.orientechnologies.orient.core.exception.ODatabaseException', hasMore: 0 }

The only solution I've found so far is to get a new connection to OrientDB by restarting the API, which isn't ideal.
After each query, I close my session, even if there is an error.
The only thing that I don't do like the docs is to close the pool, but I don't understand why I'd have to do it.

Steps to reproduce

I don't really know how to reproduce this effectively, it just happens sometimes and I need to reboot my API. It happened many times and it keeps happening but I can't figure out what to do.

Hope this helps.

Cheers.

@wolf4ood
Copy link
Member

Hi @VincentMarrec

are you running in distributed environment?
How often does this happen?

Did you notice if it happens after x time?

Thanks

@VincentMarrec
Copy link
Author

Hello,

I'm not running in distributed environment.
I didn't notice a specific period of time, it can happen 3 times in 30min, like 1 time in 4h.

This looks like a similar issue to #8733

Cheers

@wolf4ood
Copy link
Member

Hi @VincentMarrec

can you try to increase the timeout session expiration? Probably would solve temporarily the issue

Meanwhile i will try to reproduce it

https://orientdb.com/docs/2.2.x/Configuration.html#networktokenexpiretimeout

you can add -Dnetwork.token.expireTimeout=1440 in the startup script

Thanks

@VincentMarrec
Copy link
Author

Ok, I'll try.

Thank you !

@CortneyKnorr
Copy link

This has not fixed the issue. Please help I am also encountering this issue and seems to occur (in my case at least) when I querry a lot of data?

This is not just a setback or a tiny bug this makes OrientDB not reliable on any production dataset.

@CortneyKnorr
Copy link

Maybe linked to #8733

@wolf4ood
Copy link
Member

Hi @CortneyKnorr

are you using which driver OrientJS?

is it delaying the issue this settings?

 -Dnetwork.token.expireTimeout=1440

@CortneyKnorr
do you have a reproducer?

Thanks

@CortneyKnorr
Copy link

CortneyKnorr commented Sep 20, 2019

I have changed the expireTimeout but the problem persists. It seems delayed. And I can not find any way of reproducing it. It occurs maily when I request 300+ records.

OrientJS 3.0.1

@CortneyKnorr
Copy link

It also seems to depend of the quantity of data more than the number of records. BUT NO GUARANTEE

@wolf4ood
Copy link
Member

Hi @CortneyKnorr @VincentMarrec

good news i've reproduced the issue, so now i can work on a fix.

@CortneyKnorr
Copy link

Great news thank you

@wolf4ood
Copy link
Member

Hi @CortneyKnorr @VincentMarrec
i've just pushed a fix and release OrientJS 3.0.7. Please upgrade it should solve the issue

Thanks

@VincentMarrec
Copy link
Author

Hi !
I'll try with an upgraded version.
Thank you !

@MarttiR
Copy link

MarttiR commented Feb 15, 2022

For me, this error happened on OrientDB 3.2.4 after a 7-hour migration shifted from transforming data to loading it into another system.

Seems that the JS client database session needs a session refresh mechanism; otherwise the connection is closed by the server after the defined time.

@a-drop-of-tears
Copy link

I also encountered that in version 3.0.19 of the Java client orientdb client 3.0.19, the JDK is version 1.8

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

No branches or pull requests

5 participants