orient db disconnect/timeout

Skip to first unread message

Mihai Ocneanu

May 4, 2016, 5:12:25 AM5/4/16
to OrientDB

I'm having a strange issue with orientdb getting disconnected: after a longer period of inactivity ( ~3hours ? ), when we try to insert/register a new user, the attempt hangs on commit.

There is no error, but a warnings in the server log:
WARNING [com.orientechnologies.orient.client.remote.OStorageRemote] (default task-4) Caught I/O errors from Not connected (local socket=?), trying to reconnect (error: java.io.IOException: Stream closed)
WARNING [com.orientechnologies.orient.client.remote.OStorageRemote] (default task-4) Connection re-acquired transparently after 156ms and 1 retries to server '': no errors will be thrown at application level

The code is nothing out of the ordinary:

newUser = txGraph.addVertex("class:V_User");
//set some properties
= txGraph.addVertex("class:V_UConfirmationToken");
//set some other properties
.addEdge("class:E_UserConfirmationToken", newUser, userConfToken, "E_UserConfirmationToken");
//just created an edge

//and just commit the whole thing

//where OrientGraph txGraph = graphFactory.getTx() ...

By 'hangs', I mean, on commit, there are no errors thrown, the data gets persisted, but any lines of code after the commit never get executed. All our  code is executed as the result of a POST call, so the end result is that the call never completes.

The client/ JAVA API version is 2.1.6, and the DB version is the same.
The transaction is not started manually.
The app is packaged as a war and deployed with Wildfly.
If the application is redeployed / Wildfly is restarted, it will work OK until it will time-out/disconnect again.

It's difficult track down/debug as it seems to happen after a long period of inactivity.

Q: Is is something related to the odb version? Should we try mis-matched client/db versions?
Q: How/when does the timeout/disconnect occur? Why does it occur?
Q: Can we change the timeout interval?
Q: Is there a way to manually check within the Java API that we're disconnected and then manually reconnect?


Andrea Pravato

May 4, 2016, 5:17:19 AM5/4/16
to OrientDB
The same situation happens if we use the database from the same server in which the database is running, with the difference that the first warning is about Channel closed instead of Stream closed:
WARNING [com.orientechnologies.orient.client.remote.OStorageRemote] (default task-4) Caught I/O errors from Not connected (local socket=?), trying to reconnect (error: java.io.IOException: Channel closed)

Luca Son

May 4, 2016, 5:50:33 AM5/4/16
to orient-...@googlegroups.com
Hi Mihai,

the reasons of the issue can be different (e.g. network problems) but similar issues have been fixed in the latest OrientDB versions.

Could you try to update to the latest 2.1.16 ?

Reply all
Reply to author
0 new messages