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

Session loss & connection management strategy #75

Open
ndelaforge opened this issue May 25, 2016 · 3 comments
Open

Session loss & connection management strategy #75

ndelaforge opened this issue May 25, 2016 · 3 comments
Assignees

Comments

@ndelaforge
Copy link

Hi all,

I am testing the couple orientdb-gremlin and gremlin-scala in production environment and I am experimenting data loss after some time. OrientDB is logging exceptions about unknown sessions :

com.orientechnologies.common.io.OIOException: Found unknown session 6
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.onBeforeRequest(ONetworkProtocolBinary.java:240)
    at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:214)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

So what is the best way to manage connection to OrientDB ?

@mpollmeier
Copy link
Collaborator

not sure what that error is about, would be better to ask the orient guys, they are typically quite responsive.
i typically let orient handle the connection for me. all i do is

val graph: ScalaGraph[OrientGraph] = new OrientGraphFactory(url, user, pass).getNoTx.asScala

@mpollmeier
Copy link
Collaborator

is there anything on the orient server console?

@ndelaforge
Copy link
Author

I am doing quite the same way.

  lazy val factory: OrientGraphFactory = new OrientGraphFactory(uri, user, passwd).setupPool(10)
  lazy val graphNoTx: ScalaGraph[OrientGraph] = factory.getNoTx(true, true).asScala

And com.orientechnologies.common.io.OIOException: Found unknown session X are from orient server console.

I guess this has something to do with the way I manage graph instances.
My client app is also a server, so my graph instance is kept open.
It looks like orientdb is closing sessions after some time.

@wolf4ood wolf4ood self-assigned this Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants