Link to home
Start Free TrialLog in
Avatar of Jim Youmans
Jim YoumansFlag 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.
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

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
Avatar of 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
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Hi Jim,

Do you need any more info on this ? :)

Regards,
    Tomas Helgi
Hi Jim,

Do you need any more info/help on this ?

Regards,
    Tomas Helgi