connection pool

connection pool

Postby wgkwvl » Thu 17 Nov 2011 09:49

As of today we suddenly get this error in our production environment.
Our devart component did not change ( still version 6.30.202.0),
our connectionstring is :
connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=Devart.Data.Oracle;provider connection string="User Id=xxx;Password=xxx;Server=xxxrod;Direct=True;Sid=xxx;Persist Security Info=True;Pooling=True;Min Pool Size=15;Connection Lifetime=120;""

Is there a way to monitor this connection pool ? to find out if it is actually full
( we only have 60 users spread over 2 servers , so we should have to push really hard to fill 2 connection pools of 100 connections ) (default value = 100? )


Type : System.Data.EntityException, System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The underlying provider failed on Open.
Source : System.Data.Entity
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void OpenStoreConnectionIf(Boolean, System.Data.Common.DbConnection, System.Data.Common.DbConnection, System.String, System.String, Boolean ByRef)
Stack Trace : at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at Afda.Model.AfdaEntities.OpenConnection()
at Afda.Model.AfdaEntities.Pck_Repos_Patienten_Getheaderinfo(Nullable`1
Additional Info:

TimeStamp : 17/11/2011 9:24:59
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : /LM/W3SVC/1/ROOT/AfdaServices_Release_20111116.1-3-129659945296643946
Inner Exception
---------------
Type : System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
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.
Source : Devart.Data.Oracle
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Devart.Common.DbConnectionInternal a(Devart.Common.DbConnectionBase)
Stack Trace : at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
wgkwvl
 
Posts: 39
Joined: Tue 20 Jul 2010 15:13

Postby Shalex » Fri 18 Nov 2011 11:07

wgkwvl wrote:Is there a way to monitor this connection pool ? to find out if it is actually full

Please try using the dbMonitor tool.
Download link: http://www.devart.com/dbmonitor/dbmon3.exe
Documentation: http://www.devart.com/dotconnect/oracle ... nitor.html
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Postby wgkwvl » Mon 21 Nov 2011 09:08

The connection pool was probably full ( on max poolsize of 100),
we changed the maxpoolsize to 200,
and when monitoring with the dbmonitor tool, we see it going to around 112 connecions ( min pool size = 15).
this for 20 a 30 concurrent users.

The number of 'connection objects' in the 'objecttree' window does not appear to correspond to the number of connections in the connectionpool.

There seems to be a problem with connections not being returned to the connection pool, or connections staying in the connectionpool without being cleaned up.
( now we get oracle error : NET: Connection was refused with error ORA-12518), caused by our server having to many processes.
wgkwvl
 
Posts: 39
Joined: Tue 20 Jul 2010 15:13

Postby wgkwvl » Mon 21 Nov 2011 12:17

I found the cause:
we recently added a wcf service with a callback call to the client;

When we now call this wcf service the connection that is opened by entity framework in the code behind this service , is not closed.

I dont know if this is a bug in my code, or a bug in entity framework.

atm i am working around it by manually closing my connection in the dispose of this wcf service .
wgkwvl
 
Posts: 39
Joined: Tue 20 Jul 2010 15:13


Return to dotConnect for Oracle