This issue we found in mariaDB upgrade from 10.6.11 to 10.11.5 and fresh install

I have below stacktrace found in my springboot application:

XYZ DB Connection Pool - Connection org.mariadb.jdbc.Connection@adf6f64 marked as broken because of      SQLSTATE(08000), ErrorCode(-1)
 java.sql.SQLNonTransientConnectionException: (conn=968) Socket error
        at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:293) ~[mariadb-java-client-3.1.4.jar!/:?]


XYZ DB Connection Pool - Failed to validate connection org.mariadb.jdbc.Connection@12e8ef4d ((conn=969) Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.

I have following version of modules used in my stack:

MariaDB: 10.11.5
mariadb-java-client: 3.1.4
hikariCP: 4.0.3
Java: 1.8.0_362
Spring-Boot: 2.7.18

I have these properties which i use to set the datasource for HikariCP in my springBoot application:

db.connection.pool.minIdle.size=10
db.connection.pool.max.size=300
db.connection.idle.timeout=30000
db.connection.setup.timeout=30000
db.connection.maxLife.timeout=250000

I have these DB properties set for timeout:

connect_timeout                         10    
delayed_insert_timeout                  300  
idle_readonly_transaction_timeout       0    
idle_transaction_timeout                0    
idle_write_transaction_timeout          0    
innodb_flush_log_at_timeout             1    
innodb_lock_wait_timeout                50    
innodb_rollback_on_timeout              OFF  
interactive_timeout                     28800
lock_wait_timeout                       86400
net_read_timeout                        30    
net_write_timeout                       60    
rpl_semi_sync_master_timeout            10000
rpl_semi_sync_slave_kill_conn_timeout   5    
slave_net_timeout                       60    
thread_pool_idle_timeout                60    
wait_timeout                            28800
  1. What kind of deployment is it? Container or rpm? - Container
  2. When are you seeing this error? Is it during connecting to MariaDB? If so, from where are you connecting and which service are you connecting to? - We have spring boot application which is container, using hikariCP java package we are trying to connect to DB and get data. The error shared is in spring boot application service logs, when we get a API request from UI which services try reading data from DB and return response.

I have tried/checked few things as mentioned below:

  1. The issue only occurs when the mariadb version is 10.11.5 and not 10.6.11
  2. No issue with number of request/connection, its within the number of max cool size
  3. I have tried keeping the maxLifetime < wait_timeout and other hikariCP properties as mentioned previously
0

There are 0 best solutions below