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

Remote server closed the connection #10192

Open
fortuneyan opened this issue Mar 14, 2024 · 1 comment
Open

Remote server closed the connection #10192

fortuneyan opened this issue Mar 14, 2024 · 1 comment

Comments

@fortuneyan
Copy link

fortuneyan commented Mar 14, 2024

OrientDB Version: 3.2.28

Java Version: 1.8

OS: Linux CentOS 8

orientdb-server-contig.xml configured:

<properties>
           <entry name="network.binary.allowNoToken" value="true"/>
           <entry name="network.token.expireTimeout" value="525600"/>
</properties>

Expected behavior

No need to restart nodejs rest services

Actual behavior

We use orientjs client 3.2.0 connecting to OrientDB3.2.28, "Remote server closed the connection" exception reported after 1 day running.

Exception Log:

SEVER Error reading request [ONetworkProtocolBinary]
java.lang.StringIndexOutOfBoundsException: String index out of range: 1668246834
at java.lang.String.checkBounds(String.java:385)
at java.lang.String.<init>(String.java:425)
at com.orientechnologies.orient.core.serialization.serializer.stream.OStreamSerializerAnyStreamable.fromStream(OStreamSerializerAnyStreamable.java:68)
at com.orientechnologies.orient.client.remote.message.OCommandRequest.read(OCommandRequest.java:70)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:318)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:238)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:68)

After Restart nodejs services, the connections were created successfully.
The services connecting to OrientDB 2.2.37 works well.

Steps to reproduce

Just let services running and wait for more than one day, service will report connection exception "Remote server closed the connection".

@tglman
Copy link
Member

tglman commented Mar 14, 2024

Hi,

I've seen similar things in the past, in some cases even independently to the OrientDB code, the network will drop the connection if for a while it was idle(more then a day), at the end the solution I found out was to make sure that the client would have at least some activity every once a while with some artificial request if none were happening for some time(less than a day).

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

2 participants