microsoft / spring-data-gremlin

We are in the process of deprecating Spring Data Gremlin. -- Provide generic annotation oriented programming form based on gremlin for graph database
Other
128 stars 76 forks source link

Gremlin driver throwing connection timeout exception after several requests #196

Closed jothybabu closed 3 years ago

jothybabu commented 5 years ago

Expected Behavior

Spring data gremlin driver throws timeout exception after serving several request.If the latest version of gremlin - driver is used,it automatically reconnects and works as expected.

Current Behavior

After several requests get the following error : gets the error - "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out while waiting for an available host - check the client configuration and connectivity to the server if this message persists".

Possible Solution

The issue is with the gremlin-driver version used by the spring-data-gremlin. Please refer apache issues to find the issue with used version of gremlin driver(version - 3.2.4) - https://issues.apache.org/jira/browse/TINKERPOP-2044 They have fixed the issue in the latest gremlin-driver versions.Please release a new spring -data gremlin version with the following dependency :

org.apache.tinkerpop
        <artifactId>gremlin-driver</artifactId>
        <version>3.4.0</version>

3.4.0 or higher version can be used.

Steps to Reproduce (for bugs)

Reference : https://issues.apache.org/jira/browse/TINKERPOP-2044

Snapshot Code for Reproduce

@SpringBootApplication
public class Application {
    public static void main(String... args) {
        SpringApplication.run(Application.class, args);
    }
}

Branch

master

Your Environment

Incarnation-p-lee commented 5 years ago

@jothybabu Thanks a lot for you issue and root cause the failure. We will update the apache dependency later.

jothybabu commented 5 years ago

@Incarnation-p-lee Can you please tell the date which you are planning for the next release

Incarnation-p-lee commented 5 years ago

@jothybabu It may take one or two weeks I think, as we are in Cheses new year holiday this week.

apetropavlovskiy commented 5 years ago

Any news? It is a serious issue does not allow our company to use Cosmos Graph..

apetropavlovskiy commented 5 years ago

Solved by:

    <dependency>
        <groupId>org.apache.tinkerpop</groupId>
        <artifactId>gremlin-driver</artifactId>
        <version>3.2.11</version>
    </dependency>
    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>spring-data-gremlin-boot-starter</artifactId>
        <version>${azure.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.tinkerpop</groupId>
                <artifactId>gremlin-driver</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
akahd commented 4 years ago

Solved by:

    <dependency>
        <groupId>org.apache.tinkerpop</groupId>
        <artifactId>gremlin-driver</artifactId>
        <version>3.2.11</version>
    </dependency>
    <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>spring-data-gremlin-boot-starter</artifactId>
        <version>${azure.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.tinkerpop</groupId>
                <artifactId>gremlin-driver</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Hey I run into your answer while searching for possible solution to the exact error message. Can you elaborate more on which gremlin you used that solved this exception? we are currently using 3.3.2 and we are bombed by this one. Thank you.

apetropavlovskiy commented 4 years ago

It is related just for CosmosDb+Gremlin API which is not so good solution because of bad performance, cost and Tinkerpop query compliance. At least CosmosDb+Gremlin API can not really operate over 300K objects effectively. So I decided to use another solution.

akahd commented 4 years ago

thank you for the answer. i thought upgrading the api would work.

chenrujun commented 3 years ago

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

msingal003 commented 2 years ago

I am getting the same timeout exception I was getting with version 3.2.4: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out while waiting for an available host - check the client configuration and connectivity to the server if this message persists. FYI we have around 2,000,000 vertices in our GraphDB if that is any point of concern. Is there any other resolution?