Resolving timeout error

Resolving timeout error when you establish connection to the database.

Symptoms

When you explore Db2 Data Management Console on Cloud Pak for Data, the following error message might be displayed:
Timeout getting a transport object from pool.
      ERRORCODE=-4210, SQLSTATE=57033

Causes

When the securityMechanism=9 property is used at the JCC client-side to connect to a database that uses the SRVCON_AUTH = SERVER_ENCRYPT configuration, the process of establishing connection takes longer than usual time. Sometimes, it might take tens of seconds in the first attempt of connection after you restart the database server. If the time spent for establishing the connection to the database exceeds the connectionTimeout limitation, it might cause the -4210 error.

Resolving the problem

The default values of loginTimeout is 30 seconds and connectionTImeout is 0. The loginTimeout or connectionTImeout values can be customized. If the connectionTImeout is set to a positive value, that value overrides any other timeout values that are set on a connection, such as loginTimeout. Therefore, to resolve this problem, perform these steps to set the connectionTImeout to a positive value.

  1. Get the instance ID:
    oc get dmc -n ${PROJECT_CPD_INST_OPERANDS}
  2. Edit the configmap ${DB2INSTANCDID}
    oc edit cm ${DB2INSTANCDID}
  3. Add :connectionTImeout=40 after 50001/BLUDB. An example of the profile of the configmap is provided below.
    profile: '{"DB_IDENTITY_HASH":"-88665374","URL":"jdbc:db2://c-db2oltp-1635255394239239-db2u-engn-svc:50001/BLUDB:connectionTimeout=40","_PROFILE_INIT_":"true","collectionCred":{"isCollectionCred":"true","password":"changeit","refreshToken":"","securityMechanism":"9","user":"db2inst1"},"dataServerExternalType":"DASHDBTX","dataServerType":"DB2LUW","databaseName":"BLUDB","databaseVersion":"11.5.0","databaseVersion_VRMF":"11.5.6.0","dbUUID":"a3046c10-9ce1-4d1a-9fcd-7a82b16049cc","host":"c-db2oltp-1635255394239239-db2u-engn-svc","isInstPartitionable":"false","lastUpdatedTimeStamp":"1635256696467","name":"db2oltp-1635255394239239","namespace":"","plan":"smp","port":"50001","sslCertLocation":"/opt/ibm-datasrvrmgr/Config/cpd-internal-tls/ca.crt","sslConnection":"true","timeZone":"0","timeZoneDiff":"0"}'
      profileName: db2oltp-1635255394239239
        
  4. Save the changes to configmap.

If the problem persists, tune the value of connectionTimeout.