IBM Support

DB2 CONNECT TO DATABASE CAN FAIL WITH SQL1221N

Troubleshooting


Problem

Connection to a database could fail with SQL1221N. $ db2 connect to SAMPLE SQL1221N The Application Support Layer heap cannot be allocated. SQLSTATE=57011 This could be due to hitting the kernel limit for ShmSeg.

Symptom

$ db2 connect to SAMPLE
SQL1221N The Application Support Layer heap cannot be allocated.
SQLSTATE=57011

Diagnosing The Problem


Look to check the number of Shared memory segments that have been created for the instance, and check the current kernel setting:

$ipcs -m |grep <Instance Name> | wc -l
256

$db2pd -inst
...
Shared Memory Information:
ShmMax ShmMin ShmIds ShmSeg
494464838861 1 19212 256
...

Resolving The Problem

The kernel value ShmSeg should be increased.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Connectivity - Other","Platform":[{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.8;9.7;9.5","Edition":"Advanced Enterprise Server;Enterprise Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21584577