Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Getting java.nio.channels.ClosedChannelException after an idle period of time #252

Closed
benoit-david opened this issue Nov 5, 2019 · 2 comments
Labels
azure-spring gremlin New feature New feature, and need peer review

Comments

@benoit-david
Copy link

benoit-david commented Nov 5, 2019

Expected Behavior

  • Connections should be recycled after a period of inactivity.

Current Behavior

  • After a long period of inactivity (a night for example) the first Query made to the Gremlin cosmosDB database ends up with java.nio.channels.ClosedChannelException.

After several refresh, the connections are recycled and everything is back on track.

Possible Solution

  • Is the KeepAliveInterval feature implemented ? As I don't see it in the GremlinProperties options. The connections should be recycled automatically by the pool.

Steps to Reproduce (for bugs)

  • Open a cluster with 2 connections
  • Let the cluster idle for a long period (a night for example)
  • Try to query the Gremlin CosmosDB database

Snapshot Code for Reproduce

@Repository
public interface MyExampleRepository extends GremlinRepository<FooBar, String> {

}

Then calling a simple method like following would cause the issue after an idle period:

    Optional<FooBar> fooBar = myExampleRepo.findById(myId);
}

Branch

  • 2.0.2

Your Environment

  • Spring data gremlin version used: 2.0.2
  • Gremlin driver version: 3.2.4
  • SDK version: 1.8
@benoit-david benoit-david changed the title Getting Getting java.nio.channels.ClosedChannelException after an idle period of time Nov 5, 2019
@superrdean superrdean self-assigned this Nov 5, 2019
@superrdean superrdean added the New feature New feature, and need peer review label Nov 6, 2019
@superrdean
Copy link
Contributor

Hi @benoit-david
This is a new feature indeed, and in a short time, we may not consider adding it to our library. But PR is welcome. Sorry for the inconvenience.

@chenrujun
Copy link

Closing this issue.
Because it's not active for a long time.
If anyone have similar issue, please create issue in new repo: https://github.com/Azure/azure-sdk-for-java/issues

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring gremlin New feature New feature, and need peer review
Projects
None yet
Development

No branches or pull requests

4 participants