In Spanner what is the equivalent to MySQL wait_timeout and connect_timeout variables?

107 Views Asked by At

In mysql you can check this variables with commands like:

SHOW VARIABLES LIKE 'connect%';
SHOW VARIABLES LIKE 'wait_%';

in spanner how can one check this and also edit them?

I need to know because I am getting this warning in SpringBoot with Hikari:

Possibly consider using a shorter maxLifetime value - hikari connection pool spring boot

I have seen it before, with mysql you set this hikari property based on the wait_timeout configured on the database, but with spanner im not sure, I am using default hikari config so it is set on 30 mins by default.

Edit (screenshot of hikari warning):

warning

1

There are 1 best solutions below

4
On

What exactly are you trying to achieve?

Most Cloud Spanner clients do not support connection variables, because many of the clients are stateless. The Cloud Spanner JDBC driver does support a fixed set of connection variables. These are documented here: https://cloud.google.com/spanner/docs/jdbc-session-mgmt-commands