IBM Support

SQL1224N while applications try to connect to database.

Troubleshooting


Problem

The error SQL1224N is sometimes seen, when applications attempt to connect to a Db2 database.

Symptom

The following errors might be reported:

1) Running the command db2 connect to sample (or connecting through an application) results in the following error:
SQL1224N The database manager is not able to accept new requests, has terminated all requests in progress,
or has terminated your particular request due to an error or a force interrupt. SQLSTATE=55032
If this initial error is generated, the following errors might also occur:

2) The following errors appear in the db2diag.log file:
  • 2012-04-02-09.27.55.355033-300 E101734A576 LEVEL: Error
    PID : 803052 TID : 60134 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    APPHDL : 0-44570 APPID: *LOCAL.db2inst1.120402142757
    AUTHID : DB2INST1
    EDUID : 60134 EDUNAME: db2agent (SAMPLE) 0
    FUNCTION: DB2 UDB, DRDA Application Server, sqljsTermAgentReply,
    probe:10
    MESSAGE : DIA5000C A DRDA AS token "AGENT TERMINATING" was detected. The
    diagnostic data returned is (SRVDGN): "SQLERRP:SQLRRRCP
    SQLCODE:-1224".
  • 2012-04-02-09.27.55.355572-300 E102311A827 LEVEL: Error
    PID : 803052 TID : 60134 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
    APPHDL : 0-44570 APPID: *LOCAL.db2inst1.120402142757
    AUTHID : DB2INST1
    EDUID : 60134 EDUNAME: db2agent (SAMPLE) 0
    FUNCTION: DB2 UDB, DRDA Application Server, sqljsTermAgentReply,
    probe:11
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
    sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1224 sqlerrml: 0
    sqlerrmc:
    sqlerrp : SQLRRRCP
    sqlerrd : (1) 0x80100003 (2) 0x00000003 (3) 0x00000000
    (4) 0x00000000 (5) 0x00000000 (6) 0x00000000
    sqlwarn : (1) (2) (3) (4) (5) (6)
    (7) (8) (9) (10) (11)
    sqlstate:

3) Lock timeout errors appear in the db2diag.log file, close to one of the SQL1224N errors:
  • 2012-04-02-13.03.24.331110-300 I119509A512 LEVEL: Error
    PID : 803052 TID : 48206 PROC : db2sysc 0
    INSTANCE: db2inst2 NODE : 000 DB : DTC
    APPHDL : 0-46261 APPID: *LOCAL.db2inst2.120402180315
    AUTHID : DB2INST2
    EDUID : 48206 EDUNAME: db2agent (DTC) 0
    FUNCTION: DB2 UDB, catalog services, sqlrlCatalogScan::update, probe:70
    RETCODE : ZRC=0x80100044=-2146435004=SQLP_LTIMEOUT
    "LockTimeOut - tran rollback Reason code 68"

    2012-04-02-13.03.24.331444-300 I120022A513 LEVEL: Warning
    PID : 803052 TID : 48206 PROC : db2sysc 0
    INSTANCE: db2inst2 NODE : 000 DB : DTC
    APPHDL : 0-46261 APPID: *LOCAL.db2inst2.120402180315
    AUTHID : DB2INST2
    EDUID : 48206 EDUNAME: db2agent (DTC) 0
    FUNCTION: DB2 UDB, catcache support, sqlrlc_systables_update, probe:60
    MESSAGE : ZRC=0x80100044=-2146435004=SQLP_LTIMEOUT
    "LockTimeOut - tran rollback Reason code 68"

4) An error stating that the db2stmm operation failed, due to insufficient memory from the operating system (OS), appears in the db2diag.log file:
  • 2010-05-19-04.38.44.717026+480 E18683472A640 LEVEL: Warning
    PID : 237700 TID : 11566 PROC : db2sysc 0
    INSTANCE: db2inst3 NODE : 000 DB : SAMPLE
    APPHDL : 0-32280 APPID: *LOCAL.DB2.100419115817
    AUTHID : DB2INST3
    EDUID : 11566 EDUNAME: db2stmm (SAMPLE) 0
    FUNCTION: DB2 UDB, Self tuning memory manager,
    stmmCheckIfFreeMemoryIsEnoughForSizeIncr, probe:555
    MESSAGE : ZRC=0xFFFFEC49=-5047
    DATA #1 : String, 143 bytes
    There is not enough free memory for size increase. Free memory in pages:
    Physical memory = 0, Instance memory = 388599, Database memory = 49152

    2010-05-19-04.38.44.718493+480 I18684113A636 LEVEL: Error
    PID : 237700 TID : 11566 PROC : db2sysc 0
    INSTANCE: db2inst3 NODE : 000 DB : SAMPLE
    APPHDL : 0-32280 APPID: *LOCAL.DB2.100419115817
    AUTHID : DB2INST3
    EDUID : 11566 EDUNAME: db2stmm (SAMPLE) 0
    FUNCTION: DB2 UDB, Self tuning memory manager, stmmUpdateDBConfig,
    probe:275
    MESSAGE : ZRC=0x82AE00A7=-2102525785=STMM_CONFIG_UPDATE_FAILED
    "An attempted configuration update failed"
    DATA #1 : String, 79 bytes
    Error updating parameter Database_memory, updateValue = 309540, sqlcode
    = -5047
5) Remote connections by applications fail after the db2start command is run on a pureScale cluster:
  • [jcc][t4][2055][11259][4.16.53] The database manager is not able to accept new requests, has terminated all requests in progress, or has terminated this particular request due to unexpected error conditions detected at the target system. ERRORCODE=-1224, SQLSTATE=55032

Cause

Any one of the following could be the reason:

1. Shortage of OS resources, such as physical memory that prevents Db2 from spawning a new db2agent to response.

2. A connection limit is reached, such as max_connections.

3.A lock time-out occurs.
4. The Db2 instance is not ready for remote connections due to database recovery processing (Symptom 5)

Resolving The Problem

Any of the following might be used to resolve this issue.

1. Try a loopback connection, which requires the server to be set up for remote connections. For information on client/server communication, see the Db2 Documentation topic Client-to-server communications .
2. Make sure sufficient memory resources, such as physical memory, exist on the system.

3. If LockTimeOut errors occur, modify the application to issue more frequent commit statements.

4. If your application is using WITH HOLD cursors, either reduce the use of WITH HOLD cursors or increase the value of max_connections.

Note: Refer to the Db2 Documentation topic, Restrictions and behavior when configuring max_coordagents and max_connections, for information on the restrictions and behavior related to configuring the max_connections parameter.

5. Alternatively, you can recycle your instance by using the db2stop or db2stop force and db2start command to resolve this error.

6. There are many reasons for which this message can be returned. For more information, refer to the SQL message for SQL1224N in the Db2 documentation.
7. (Symptom 5) If AUTORESTART is turned ON (the default) for the databases run db2 ACTIVATE DATABASE <dbname> after the db2start. The command blocks until the instance is ready for use by remote connections. If AUTORESTART is turned OFF, each database might need a manual db2 RESTART DATABASE <dbname>. If needed, refer to the documentation for these commands.

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PkdAAE","label":"Connectivity"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"All Versions"}]

Document Information

Modified date:
08 December 2022

UID

swg21613841