In would assume that you are also getting the System.InvalidOperationException with the message "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached."
We have experienced that same problem on multiple occasions with our web servers. I have been wanting to address this question also since it causes a huge problem for us when it happens. We have run into this problem in the following cases: 1) LAN connectivity temporarily lost as in your case. 2) The currently "preferred" DC (by this I mean the DC that authenticated our user that our sites are running under) the webserver is actively using is brought offline. We are running AD in Native mode. 3) Any time we purposely move the SQLServer cluster group or it fails fails over to another node. Once is is active on the other node the connections in the pool no longer seem to be valid. In all cases above it appears that all or some of the previous connections in the connection pool become invalid and we begin to be flooded with the System.InvalidOperationException. We then have to either restart IIS on our Win2K webservers or stop and start the application pools on our win2003 servers. We are running our web servers under a domain account which may explain the problem under [2] above since it may be a temporary security problem the webservers are having until it locates the next available DC to use. We are not using integrated security connections to SQLServer. Another unrelated but similar problem also occurs when connecting to a file share through the DFS from our websites. When [2] occurs we loose our ability to contact/use the DFS through the user our web sites are running under. I don't know if this relates to the fact that the user originally authenticated to the DC and received an ldap kerberos ticket from it. Then when the DC goes down that ticket is not valid. Does anyone know if this problem is being fixed or if there are other ways to configure the pooling so these problems don't occur? Chad On Fri, 13 Aug 2004 10:35:20 -0400, Amit Sinha <[EMAIL PROTECTED]> wrote: >Wally, > Thanks for the response, I don't keep the connection open as I am working >with datasets, you can see at the end of the function i just close and >remove the connection object from memory.....but still I can see the seesion >there in Oracle server. >It's something to do with Pooling, like it somehow keeps my connection in >pool for the particular session which I don't want to be... > > > >Thanks, >Amit Sinha > > >-----Original Message----- >From: Unmoderated discussion of advanced .NET topics. >[mailto:[EMAIL PROTECTED] Behalf Of Wallace B. >McClure >Sent: Friday, August 13, 2004 10:21 AM >To: [EMAIL PROTECTED] >Subject: Re: [ADVANCED-DOTNET] ADO.NET + Oracle Connection Problem. > > >I would check the connection state at the appropiate times. I am assuming >that when you are starting up the application, you are creating and opening >a connection that is designed to stay open during the lifetime of your >application. Something like this code below should do the trick: >if ( oledbCn.State != ConnectionState.Open ) { > oledbCn.Close(); > oledbCn.Open(); >} > >Personally, I don't keep connections open, but that is a different >discussion. > >Wally > >----- Original Message ----- >From: "Amit Sinha" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Fri, 13 Aug 2004 09:55:57 -0400 >Subject: [ADVANCED-DOTNET] ADO.NET + Oracle Connection Problem. > >Hi Group, > I am facing some problem with ADO.Net+Oracle >Desc: I have a simple client server 2 tier application where my >client(VB.NET App) connects to Oracle server using ADO.Net(OldDB). It is >working fine, but problem comes in, when in case while the application is >working and we have a network outage(LAN Connections broken) then after the >outage is over the application is not able to connect to it's Oracle server. >We have to restart the application and then during startup application >builds it's new connection with Oracle server. > >Things which we have checked: In case of network outage, WE can see the User >session made at server end and that becomes Inactive and the particular >session is killed by server as per it's configuration. > >Need a way, that when ever there is a outage, the application should connect >to the Oracle automatically without being forced to restart. > >FYI..enclosing the code to make the DB Connection > >Public Function gGetDataSet(ByVal strSQL As String, ByRef strOraErr As >String, ByRef strErr As String, Optional ByVal acTable As String = "", >Optional ByRef LngRowAffected As Long = 0) As DataSet > Dim ObjConn As OracleConnection 'Define Oracle Connection >Object > Dim ObjDA As OracleDataAdapter 'Define Oracle >Data Adpter Object > Dim ObjDS As New DataSet() > > LngRowAffected = 0 > Try > ObjConn = New OracleConnection(SQL_CONNECTION_STRING) > ObjDA = New OracleDataAdapter(strSQL, ObjConn) > If acTable = "" Then > ObjDA.Fill(ObjDS, "table1") > LngRowAffected = ObjDA.Fill(ObjDS) > Else > ObjDA.Fill(ObjDS, acTable) > End If > Return ObjDS > Catch OraEx As OracleException > strOraErr = OraEx.Message > Catch ex As Exception > strErr = ex.Message > Finally > ObjConn = Nothing > ObjDS = Nothing > ObjDA = Nothing > End Try > End Function > > > >Thanks, >Amit Sinha > >=================================== >This list is hosted by DevelopMentor. http://www.develop.com >Some .NET courses you may be interested in: > >Essential .NET: building applications and components with CSharp >August 30 - September 3, in Los Angeles >http://www.develop.com/courses/edotnet > >View archives and manage your subscription(s) at http://discuss.develop.com > > >=================================== >This list is hosted by DevelopMentorŪ http://www.develop.com >Some .NET courses you may be interested in: > >Essential .NET: building applications and components with CSharp >August 30 - September 3, in Los Angeles >http://www.develop.com/courses/edotnet > >View archives and manage your subscription(s) at http://discuss.develop.com > >=================================== >This list is hosted by DevelopMentorŪ http://www.develop.com >Some .NET courses you may be interested in: > >Essential .NET: building applications and components with CSharp >August 30 - September 3, in Los Angeles >http://www.develop.com/courses/edotnet > >View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with CSharp August 30 - September 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com