0
Fixed

IdB 4.1.3 SQL Agent:  The timeout period elapsed prior to obtaining a connection from the pool.

Monash 9 years ago updated by anonymous 9 years ago 3

We use the SQL agent in IdB to read and write from a simulated SAP data source for testing. When exporting changes to the database via IdB, after approximately 100 exports, IdB starts reporting the following exception. When the IdB is stopped and restarted, a further 100 can be exported before the error reappears.

System.InvalidOperationException: 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.   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)   at System.Data.SqlClient.SqlConnection.Open()   at Unify.Framework.Data.DbConnectionExtensions.OpenIfClosed(IDbConnection connection)   at Unify.Framework.Data.SqlServerDataControl.CreateComponent(Boolean factoryInformation)   at Unify.Framework.Data.AdoNetDataControl.ExecuteDataSetQuery(DataSet resultSet, String commandText, IEnumerable`1 parameters, String[] tableNames, CommandType commandType)   at Unify.Framework.Data.AdoNetDataControl.ReturnDataSetQueryT(String commandText, IEnumerable`1 parameters, String[] tableNames, CommandType commandType)   at Unify.Product.IdentityBroker.DirectCommunicatorBase`1.GetEntitiesDataTable(ICollection`1 keyList)   at Unify.Product.IdentityBroker.DirectCommunicatorBase`1.UpdateEntities(IEnumerable`1 entities)   at Unify.Product.IdentityBroker.DirectReadWriteConnectorBase`1.UpdateEntities(IEnumerable`1 entities)   at Unify.Product.IdentityBroker.ConnectorToUpdatingConnectorBridge.UpdateEntities(IEnumerable`1 entities)   at Unify.Product.IdentityBroker.EventNotifierUpdatingConnectorDecorator.UpdateEntities(IEnumerable`1 entities)   at Unify.Product.IdentityBroker.Adapter.UpdateEntities(IEnumerable`1 entities, EntityToConnectorEntityBridge[]& connectorEntities)   at Unify.Product.IdentityBroker.Adapter.UpdateEntities(IEnumerable`1 entities)   at Unify.Product.IdentityBroker.Adapter.UpdateEntity(IAdapterEntity entity)   at Unify.Product.IdentityBroker.AdapterNotifierDecoratorBase`1.UpdateEntity(IAdapterEntity entityToSave)   at Unify.Product.IdentityBroker.CompositeAdapter.UpdateEntity(IAdapterEntity entity)   at Unify.Product.IdentityBroker.AdapterNotifierDecoratorBase`1.UpdateEntity(IAdapterEntity entityToSave)   at Unify.Product.IdentityBroker.LDIFAdapterBase.HandleExportUpdate(IAdapter adapter, IAdapterEntitySaveChange pendingUpdate)   at Unify.Product.IdentityBroker.LDIFAdapterBase.ExportChanges(ExportedLDIFForAdapter exportedLdifForAdapter)   at Unify.Product.IdentityBroker.LDIFAdapterServiceHostDecoratorBase.ExportChanges(ExportedLDIFForAdapter exportedLdifForAdapter)   at SyncInvokeExportChanges(Object , Object[] , Object[] )   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)


Unify.Framework.Data.dll

I've attached a patch that should resolve this issue. To install:

  1. Place dll into <Identity Broker install directory>/Services
  2. Restart Identity Broker service
  3. Run failing operation

Please let us know if the patch fixes the issue of if the problem persists.

Perfect. Working now. Happy to resolve this request.

Thanks Monash. This will be in Identity Broker v4.1.4. We're doing the build and final testing now.