Reconnection does not retry to remote Virtual Graph

I have a virtual graph to a hive db that is over a haproxy to site 3000 miles away, i.e. high delay, but the internet session has high throughput and low drop rate.

The StarDog "connections" are extremely flaky. The connection fails the first time access to the virtual graph with the generic error:
Caused by: java.lang.RuntimeException: java.sql.SQLException: Could not establish connection to jdbc:hive2://localhost:10003/default;auth=noSasl: null

But if I retry the query several times it finally works.

This looks like a connection pool configuration problem.
Any recommendations?
Is there a way to force a retry from Stardog Studio?

Bad connection management seems to be a common problem. I tried the hints from:

Hi John,

Did you get this resolved? Stardog pools its virtual db connections. It's possible they are timing out or in some other way becoming corrupted. You can set datasource connection properties to tune the pool parameters. See: Data Source Configuration | Stardog Documentation Latest

Some options:

# discard any connection older than 10 minutes:

# test connections before use using driver-specific validation test

# test connections before use using user-provided validation query
validationQuery=SELECT 1

Note, these are datasource options, not virtual graph options.


The hive connection worked a few times, which is better than before.
Your solution looks like: let the old connection timeout and test it before sending the actual query.
This should work for our infrequent query use case.

Is there a way in the Stardog Studio. Data Source page to force test of the connection?

It can work for frequent use cases as well as there's a timer in the pool management that skips the test if the connection was used very recently. There are dozens of tunable parameters to choose from to suit an array of use cases including no pooling of connections.

There isn't a Test button but that sounds like a good idea. I'll create a ticket for the feature.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.