so seems that using external mysql requires me to ...
# troubleshoot
e
so seems that using external mysql requires me to change the wait_timeout (till now it worked only from the sql instance and not from jdbc client url ) is there a specific way to add this property in helm charts?
i
Hello Tomer, Could you elaborate a little more on what you need? It’s not very clear from your message. You have deployed DataHub in Kubernetes but are connecting to an external MySQL instance rather than deploying MySQL using the prerequisite helm charts?
e
Hi @incalculable-ocean-74010, sure i will elaborate, I’ve deployed datahub with the helm chart provided, at start i was using the mysql provided by the prerequisite, after a while i decided to migrate to a bare metal mysql machine, i export\import the tables and was receiving many connectivity errors, it was working but a lot of calls were failing with:
Copy code
08:10:40.836 [gmsEbeanServiceConfig.heartBeat] ERROR i.e.datasource.pool.PooledConnection:311 - Error when fully closing connection [name[gmsEbeanServiceConfig1] slot[33] startTime[1659600495620] busySeconds[145] stackTrace[] stmt[select distinct t0.urn, t0.urn from metadata_aspect_v2 t0 order by t0.urn limit 1000]]
java.sql.SQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
	at com.mysql.cj.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:1848)
	at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1705)
	at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:721)
	at io.ebean.datasource.pool.PooledConnection.closeConnectionFully(PooledConnection.java:308)
	at io.ebean.datasource.pool.FreeConnectionBuffer.trim(FreeConnectionBuffer.java:91)
	at io.ebean.datasource.pool.PooledConnectionQueue.trimInactiveConnections(PooledConnectionQueue.java:442)
	at io.ebean.datasource.pool.PooledConnectionQueue.trim(PooledConnectionQueue.java:422)
	at io.ebean.datasource.pool.ConnectionPool.trimIdleConnections(ConnectionPool.java:441)
	at io.ebean.datasource.pool.ConnectionPool.checkDataSource(ConnectionPool.java:459)
	at io.ebean.datasource.pool.ConnectionPool.access$000(ConnectionPool.java:43)
	at io.ebean.datasource.pool.ConnectionPool$HeartBeatRunnable.run(ConnectionPool.java:260)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
I’ve tried to add to the values.yaml file in the JDBC connection several parameters such as wait_timeout=864000 but the issue persisted. Once our datastore guy changed the wait_timeout in the mysql instance level the issue was solved, but he said he dont want to change this for all our isntances and that my client should support it. so i’m asking if there’s a way to tell datahub to use wait_timeout in the client other than the jdbc url...
i
Can you post the changes you made to the values.yaml?
e
sure @incalculable-ocean-74010
Copy code
sql:
    datasource:
      host: "*******:3307"
      hostForMysqlClient: "*******"
      port: "3307"
      url: "jdbc:mysql://******:3307/datahub?verifyServerCertificate=false&useSSL=true&useUnicode=yes&characterEncoding=UTF-8&enabledTLSProtocols=TLSv1.2&autoReconnect=true&wait_timeout=864000"
      driver: "com.mysql.cj.jdbc.Driver"
      username: "hidden_user"
      password:
        secretRef: mysql-secrets
        secretKey: mysql-root-password
i
Datahub only uses 1 relational database, if your database guy changed the instance then DataHub should be fine now no?
Regarding the JDBC connection, I'm not sure that passing it through helm works as we use a framework (play, if I recall correctly) to handle connections to the DB
e
@incalculable-ocean-74010 i meant that he changed it as server configuration ( and under the server he holds all the instances) hm, okay, so the JDBC is used for ? i’m surprised im the first one to have this…