We have a .Net 3.5 windows services that is using the 32-bit v9.7 FP1 of the IBM.Data.DB2 dll. It's running on a Windows 2003 application server that has the DB2 Connect Server v9.7 FP1 installed. The service is pulling data from an iSeries LPAR at V5R4.
Intermittently, we are getting the following error when reading from a DB2DataReader:
ERROR 08003 IBM CLI0106E Connection is closed. SQLSTATE=08003
We were getting the same error on v9.5FP3 and hoped that the upgrade would help. It's been a few months now and it doesn't seem to have helped.
Any ideas about what might be the root cause here or how to track it down?
Pinned topic CLI0106E Connection is closed error
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-04-10T04:13:46Z at 2012-04-10T04:13:46Z by SystemAdmin
Re: CLI0106E Connection is closed error2010-09-29T13:13:31ZThis is the accepted answer. This is the accepted answer.Hi,
unfortunately, the problem you're seeing is to technical to be analyzed in a forum environment. Your best bet to resolve is to contact IBM technical support.
PS: I assume you meant V9.7FP3 as your upgrade path, not V9.5FP3, right?
PaulG_TN 110000SQQS24 Posts
Re: CLI0106E Connection is closed error2010-09-29T13:26:24ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
No, I meant v9.5. We were getting the same error on 9.5 and upgraded to 9.7FP1 to see if it would solve the problem and it didn't. I know that 9.7FP3 is out now, but we haven't yet pursued doing that upgrade. We were hoping to wait on the .net 4/VS2010 version to come out of beta and go straight to that.
My hope was that this error had some common root causes that I might be able to track down, but we can open a ticket and work through support if that is a better approach.
Re: CLI0106E Connection is closed error2010-09-29T13:38:01ZThis is the accepted answer. This is the accepted answer.
- PaulG_TN 110000SQQS
Re: CLI0106E Connection is closed error2010-10-26T15:57:56ZThis is the accepted answer. This is the accepted answer.We are also having the same problem, but with the Informix dll. It seems the core problem traces back to some shared, unmanaged code. The drivers have had serious problems with multithreaded applications for many, many versions now, and it seems there is some core, back end code that is still not thread-safe. This is the reason you see the issue intermittently, and why it problem never happens on a single-threaded Windows Forms application. My guess is you are using the driver inside of IIS or some other process that is inherently multi-threaded, right? We have opened numerous cases with IBM over the years, and the problem has improved somewhat, but we still do not have a stable, enterprise-grade driver for use in our .NET applications.
I wish you lots of luck here, because this is not an easy problem to replicate (we got stonewalled when tech support couldn't reproduce the problem at-will on their side), and despite a lot of saber-rattling still fight this problem today.
My suggestion is for you to find a way to trap when this error happens and recycle your IIS application pool or implement some other mitigating strategy as it will likely be a long time before IBM resolves the root of this nasty problem.
Re: CLI0106E Connection is closed error2012-03-28T06:40:16ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
I want to ask, mono project to rewrite the DB2 driver is better?
some people use it?
Arvind_Gupta 2700025SKH58 Posts
Re: CLI0106E Connection is closed error2012-04-06T01:16:07ZThis is the accepted answer. This is the accepted answer.Could you please provide more information on which version of DB2 driver you are having problem and which database you are connecting to?
Please clarify, what do you mean by "mono project to rewrite the DB2 driver is better"?
Re: CLI0106E Connection is closed error2012-04-09T06:19:06ZThis is the accepted answer. This is the accepted answer.
- Arvind_Gupta 2700025SKH
Version of DB2 :32-bit v9.5.2
Version of DB2 driver: 18.104.22.168 (22.214.171.124)
Exception likely to occur when multiple connections was open .
"mono project to rewrite the DB2 driver is better" mean:
Mono project rewrote the driver.
_-Eric-'s Comment "The drivers have had serious problems with multithreaded applications for many, many versions now, and it seems there is some core, back end code that is still not thread-safe. _
_ ... but we still do not have a stable, enterprise-grade driver for use in our .NET applications."_
I think there is a problem(still not thread-safe) with the IBM official drivers.(Arbitrary conclusions)
bpgross 110000C99H627 Posts
Re: CLI0106E Connection is closed error2012-04-09T16:56:46ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
Our current level is V9.7 FP5 - which has quite a few enhancements above what is in V9.5 FP2.
Eric's comment regarding this issue was specific to the Informix provider, which I take to mean the Informix provider that is part of CSDK. There were mufti-threaded issues with that .NET provider, and the recommended .NET provider for use with Informix servers is the DB2 .NET provider - as it supports all the new .NET features (eg. the Entity Framework).
With respect to Mono - thee is no IBM provided or contributed .NET provider for Mono. The last customer I was involved with on Mono was successfully using the Mono bridge and our ODBC / CLI driver.
Re: CLI0106E Connection is closed error2012-04-10T04:13:46ZThis is the accepted answer. This is the accepted answer.
- bpgross 110000C99H
I will try your solution.
I think we should tell you the current understanding of the situation.
According to the analysis of each time problem log, concluded:
In the connection pool idle connection was over. The program must create a new connection, new connection is prone to this exception.
Then, the program closes the connection, put it in the connection pool.
Our program has a retry feature.
However, the retry time, may still be obtained from the connection pool the connection(with problems).
That marks the connection(with problems). When it closed, do not put it in the connection pool.