Skip to content

Instantly share code, notes, and snippets.

@hmitsumori
Last active November 21, 2021 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmitsumori/184e695baf4ec9d670086d882a1ca7c0 to your computer and use it in GitHub Desktop.
Save hmitsumori/184e695baf4ec9d670086d882a1ca7c0 to your computer and use it in GitHub Desktop.
HikariCP
hikari:
maxLifetime: 900000
keepaliveTime: 30000
## PostgreSQL ##
connectionTestQuery: select case when current_setting('transaction_read_only') = 'off' then 1 else random() / 0 end
## MySQL ##
connectionTestQuery: select case when @@read_only + @@innodb_read_only = 0 then 1 else (select table_name from information_schema.tables) end as `1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment