Server stops querying downstream databases (Docker Stardog to Azure MySQL DB)

Hi,

I am using the latest version of Stardog in a docker container. After it is spun up I am adding an Azure SQL (MySQL) database and mapping it in based on the vkg tutorial however Stardog seems to drop the connection and not reconnect.

When executing a SPARQL query like below:

SELECT ?member ?name {
   GRAPH <virtual://music> {
      ?band a :Band ;
            :name "The Beatles" .
      ?member :member ?band ;
            :name ?name .
   }
}

This query will work a bunch of times and then stop working (supposedly) randomly. When it fails I get the following error:

bash-4.2$ /opt/stardog/bin/stardog query execute music /tmp/correct_query.sparql 
com.complexible.stardog.plan.eval.operator.OperatorException: Unable to execute virtual graph query. SQL string: SELECT `membership`.`artist`, `artist`.`name`
FROM `TEST`.`membership`
INNER JOIN `TEST`.`artist` ON `membership`.`artist` = `artist`.`id` AND `artist`.`name` IS NOT NULL
INNER JOIN `TEST`.`artist` AS `artist0` ON `membership`.`band` = `artist0`.`id` AND `artist0`.`name` = 'The Beatles' AND `artist0`.`type` = 2

If I copy and paste the generated SQL into my database it returns results, so it isn't an issue with the SQL generation:

mysql> SELECT `membership`.`artist`, `artist`.`name`
    -> FROM `TEST`.`membership`
    -> INNER JOIN `TEST`.`artist` ON `membership`.`artist` = `artist`.`id` AND `artist`.`name` IS NOT NULL
    -> INNER JOIN `TEST`.`artist` AS `artist0` ON `membership`.`band` = `artist0`.`id` AND `artist0`.`name` = 'The Beatles' AND `artist0`.`type` = 2;
+--------+-----------------+
| artist | name            |
+--------+-----------------+
|      1 | John Lennon     |
|      2 | Paul McCartney  |
|      3 | Ringo Starr     |
|      4 | George Harrison |
|      1 | John Lennon     |
|      2 | Paul McCartney  |
|      3 | Ringo Starr     |
|      4 | George Harrison |
+--------+-----------------+
8 rows in set (0.20 sec)

The only pattern I have seen that might help is that after I run an incorrectly formatted query it stops working (as if it crashes the SQL connection and it doesn't get re-established)

Any thoughts?

Can you check for the error in the stardog.log file? This is common on MySQL because persistent connections will timeout after 8 hours by default but Stardog's default connection pooling configuration should avoid this.

Hi @jess ,

error.log (32.4 KB)

Attached the logfile. Hopefully this helps

Does restarting the Stardog server consistently fix the issue? Have you altered any of the connection pooling settings in the data source?