How to discover the maximum numbers of connection has been reached
Steps you should perform to find the maximum numbers of active connections that a database support and if this number has been reached
db2 connect to <db_name>
To find out the maximum numbers of active connections that a database support type:
db2 get db cfg | grep -i MAXAPPLS
the output will be something like that:
Catalog cache size (4KB) (CATALOGCACHE_SZ) = (MAXAPPLS*4)
Max number of active applications (MAXAPPLS) = 250
If you want to check the instance level configuration for the maximum number of connections:
db2 get dbm cfg | grep -i maxthe output will be something like that:
Max number of existing agents (MAXAGENTS) = 400
Max number of coordinating agents (MAX_COORDAGENTS) = (MAXAGENTS - NUM_INITAGENTS)
Max no. of concurrent coordinating agents (MAXCAGENTS) = MAX_COORDAGENTS
Max number of client connections (MAX_CONNECTIONS) = MAX_COORDAGENTS
Number of pooled fenced processes (FENCED_POOL) = MAX_COORDAGENTS
To discover the high water mark for database connections , type the command below:
db2 get snapshot for dbm | grep -i high
the output will be something like that:
Private Sort heap high water mark = 38238
High water mark for agents registered = 129
High water mark for agents waiting for a token = 0
High water mark for coordinating agents = 126
High water mark (bytes) = 1114112
High water mark (bytes) = 2342912
In this example you can notice the database supports 250 active applications and the High water mark was 129 of the active connections.