Posssilbe reasons why Db2LUW connections are slow
Biswarup(Bis)Mukherjee 120000HKTY Visits (1605)
Following is a good document on possible reasons why db2 connections could be slow,
I just wanted to highlight one more area to consider for the connect slowness.
Sometimes a database which might not be continuously in use.
Connections are happening in low numbers and then being terminated and there is a silent period after that before some more connections are being tried again.
If the database is not activated explicitly what happens is, the first connection will activate the database implicitly and then when it will go away the database will be deactivated implicitly against the last connection in the database.
As a result, when a new connection comes after a delay it will find the database needed to be activated again.
A database activation has overheads depending on the size of the total memory it need to allocate during the activation sequence and other initialization steps there too.
The clue to find the symptom is to find FirstConnect messages in the db2diag.log over and over.
Also, there could be various reasons why db2 connections could be terminated. It could be as per the design of the setup or, by some abnormal reasons. Usually messages with -1224 will show up in the db2diag.log file if connections are being terminated.