Avatar of Jim Youmans
Jim Youmans
Flag for United States of America asked on

DB2 CLI0129E Allocate a handle failed

DB2 on Windows Server 2012

We recently started getting this error message.
 CLI0129E  An attempt to allocate a handle failed because there are no more handles to allocate. 

Open in new window

From what I have read, this is an issue with .NET Entity Framework not releasing connections to the database.  The developers are searching the application code to see if they can find the issue but in the mean time, is there anything I can do on the DB side to help with this?

I read this:  https://www.ibm.com/support/pages/cli0129e-no-more-handles  
and this: https://www.ibm.com/support/pages/how-increase-number-statment-handles-available-your-application

but not sure I understand what they are saying.  This is the first exposure I have had to DB2 handles and not sure I understand them as well as I could.  Any insight would be much appreciated.
Windows Server 2012DB2

Avatar of undefined
Last Comment
Tomas Helgi Johannsson

8/22/2022 - Mon
Tomas Helgi Johannsson

Hi,

Have you tried this ( increase number of statement handles to applications)  ?
How much memory does your Windows system have ?  
Note that CLIPkg is by default 3 and use caution when increasing the amount of packages as each package uses considerable amount of memory and resources.

https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.apdv.cli.doc/doc/r0008961.html
https://datageek.blog/2013/09/04/binding-packages/ (see the section on CLIPKG issues )

Regards,
    Tomas Helgi
Jim Youmans

ASKER
Thank you for the response.  I read the first link and have a couple of noob questions if you have a minute.

What does this command do?  
db2 "BIND @db2cli.lst BLOCKING ALL CLIPKG 6 grant public"

Open in new window

 I ran it on my test server with no issue but I don't feel comfortable doing it in prod till I understand it.  I tried using the related information links at the bottom of the page but they just take me to the main  knowledge center page.

Also, how can I see what the CLIPKG parameter is set to?  I know that the default is 3 but I don't know how to check my system to see what it is set at.

Looking at my system I don't seem to have a db2cli.ini file.  Just a sample.  Is this an issue?

My server has 32 GB for memory.

Thank you!!
ASKER CERTIFIED SOLUTION
Tomas Helgi Johannsson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Tomas Helgi Johannsson

A total of 1344 statement handles means that Db2 by default allows 1344 concurrent statements from applications that connect to Db2 to be run on the server

Regards,
    Tomas Helgi
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Tomas Helgi Johannsson

Hi Jim,

Do you need any more info on this ? :)

Regards,
    Tomas Helgi
Tomas Helgi Johannsson

Hi Jim,

Do you need any more info/help on this ?

Regards,
    Tomas Helgi