-
Notifications
You must be signed in to change notification settings - Fork 150
Server keeps Expiring Session. #187
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
Comments
Hi @SnappyCroissant, Does this happen every time you run the query? Did you check neo4j database log when this error happens? |
It's happening with all queries executed through the driver, every time. neo4j.log, debug.log all read nothing. query.log isn't generating despite being turned on. Neither from the cypher-shell queries or the ones coming from node. Threshold is set to 0 so it should be getting everything. |
I've tried to recreate the issue in a fresh project and I can't. I'm thinking it's something in the project setup somewhere breaking it. For the moment I've switched to REST, this project won't see production so efficiency isn't mission critical. When I get some time though I'll see if I can isolate the problem incase anyone else runs into it. |
@SnappyCroissant are you using the same database instance in the fresh project? do you ever close sessions (your example does not have |
In the original code that failed before I started reconfiguring to test there was a I tried the fresh project on a new instance and the same one, same results. I played around with it some more and got the vanilla node version working inside the original project after wiping and reinstalling all npm modules incase I'd broken somethign unknowingly going through turning on logs and playing with typings and such. But it still breaks the same way within the project so I'm thinking there's a conflict somewhere around transpiling, streams or next tick that's corrupting something on the way to the server and back. I've started stripping things back layer by layer. Starting at where I first encountered the problem. First encounter conditions:
Next step is to run outside of mocha but trying to isolate the production code. Then switching from transpiled es6 imports to require statements. I've already run the script as part of the larger project which has been failing from the start. But I want to pull things out piece by piece. At the moment though none of those changes have changed anything. It's really got me stumped. There's got to be some strange conflict somewhere. I'm definitely moving away from typescript in further projects. I've got a hobby project at home running pure node with harmony flags that is working brilliantly with this module. This combined with async await is a dream. |
@SnappyCroissant could you maybe create a github repo with a project that reproduces the problem? We can then take a look as well. |
You can find it here: https://github.com/SnappyCroissant/ts-koapollo I've cleaned it up a little and left some notes in the readme. |
Thanks @SnappyCroissant! We will take a look. |
Hi @SnappyCroissant, I created a PR with tentative fix for this problem: https://github.com/SnappyCroissant/ts-koapollo/pull/1. Problem happened because of I can't fully verify the fix because project does not build. Some TypeScript errors... We need to improve logging in the database and possibly verify types in Please let me know if this helps. |
That's worked! I'm not sure where I got that structure for parameters, or how I managed to miss it. Maybe from early attempts with other libraries it got left over. I'm glad something has come of my mistake though. Thanks for all your help! |
Hi @SnappyCroissant, Both PRs are now merged. Error logging will be available in next neo4j 3.1.1 and 3.2. Parameter type checks will be available in JS driver 1.1.0 or 1.2. Thanks for your help! |
Hi @SnappyCroissant and @lutovich |
Hi @Prateek218, could you please share more info about your project? Maybe share code you use to query the database? This particular issue happened because |
This my code, database log, and server error.
Database log
server log
|
@Prateek218 I see you also created a separate issue #244. Let's move our discussion there. Will go through the code now. |
I'm just going to add in here that its extremely important to note where exactly If your I'm just including this for people searching later. I say this because the true error is: |
Hi Neoj4 : v4.2.0 neo4j-URI: neo4j+s://example.databases.neo4j.io:7687 `Neo4jError: Connection was closed by server
code: 'SessionExpired', I am using
Can you please help me to fix "SessionExpired" issue ? |
I've tried the following in node 7.3.0, 7.3.1 and 8.0.1:
That gives me (with debug on):
I thought maybe it was a bolt or server-side problem so I tried cypher-shell.
Same query through cypher-shell:
I'm absolutely stumped, any help is much appreciated. I'm going mad. I've tried a million variations of starting and closing sessions and drivers to no avail.
The text was updated successfully, but these errors were encountered: