IBM Support

CLP intermittently times out on connections

Troubleshooting


Problem

You may encounter intermittent time-out errors in connections made from the DB2 Command Line Processor (CLP). The message in the db2diag.log will be: CLP frontend unable to get REQUEST queue handle.

Cause

APAR IY66728 could be one of the causes for this behaviour. This APAR is related to ICC (IBM Crypto for C) libraries that are called internally when the back-end process (BP) first gets spawned and before the CLP initialization code starts.

The problem is that the BP that calls the ICC libraries can sometimes experience a delay of up to several minutes before processing can continue. In other words, the symptom would be that the CLP BP does not get initialized on time, which causes the front-end process (FP) to time out (default is 60 seconds) and exit before the BP is completely initialized.

If you are using DB2® Universal Database™ (DB2 UDB) Version 8.1 FixPak 7 (equivalent to DB2 UDB Version 8.2 GA) or later, you can potentially experience this behaviour.

Diagnosis Details

An example of the full error message that you will see in the db2diag.log at the time of the problem is as follows:

2005-04-19-22.52.14.687756-240 I37943C375 LEVEL: Error
PID : 154276 TID : 1 PROC : db2
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, command line process, clp_start_bp, probe:3
MESSAGE : CLP frontend unable to get REQUEST queue handle
DATA #1 : Hexdump, 4 bytes
0x2FF207AC : 870F 0042

Resolving The Problem

To verify if this APAR is indeed the cause of the problem, obtain a call stack for the db2bp process using one of the following methods:

  1. If you are using DB2 UDB Version 8.2 GA or later on Linux® and UNIX®, or DB2 UDB Version 8.2 FixPak 2 or later on Windows®, you can issue the command
    db2pd -stack
    <PID of the db2bp process>
  2. Alternatively, attach to the db2bp process with a debugger such as dbx
  3. If you are using DB2 UDB on AIX®, you also have the option of issuing a kill -36 <pid of the db2bp> command.

If the cryptContextInit() function shows up in the stack then this APAR is definitely what you need. If that function doesn't show up in the stack, then this APAR is not applicable.

The workaround for this problem is to change the default time-out for the CLP. This is done by manipulating two CLP options: DB2BQTRY and DB2BQTIME. The default values are:

DB2BQTIME = 1

DB2BQTRY = 60

This means that every second the FP will see if the BP is ready and will do this 60 times. So if the connection cannot be made within 60 seconds, the FP will time out leading to the error message in the db2diag.log file.

The work around is to change only DB2BQTRY from the default value:

For example:

db2set DB2BQTRY= 2400

db2set DB2BQTIME= 1



These settings change the time-out period to 40 minutes with the FP attempting to connect to the BP every second.

Related Information

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Programming Interface - CLP","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8","Edition":"Enterprise;Personal;Workgroup;Express","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21205772