Entity framework FirebirdSql.Data.FirebirdClient.FbException:数据库打开的句柄太多

Entity framework FirebirdSql.Data.FirebirdClient.FbException:数据库打开的句柄太多,entity-framework,entity-framework-6,firebird,Entity Framework,Entity Framework 6,Firebird,今天,我向firebird 2.5.6数据库中导入了一个更大的数据,得到了以下异常: System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> FirebirdSql.Data.FirebirdClient.FbException: to

今天,我向firebird 2.5.6数据库中导入了一个更大的数据,得到了以下异常:

System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> FirebirdSql.Data.FirebirdClient.FbException: too many open handles to database ---> FirebirdSql.Data.Common.IscException: too many open handles to database
   bei FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ProcessResponse(IResponse response) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:Zeile 641.
   bei FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadResponse() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:Zeile 673.
   bei FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadGenericResponse() in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:Zeile 681.
   bei FirebirdSql.Data.Client.Managed.Version11.GdsStatement.Prepare(String commandText) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version11\GdsStatement.cs:Zeile 80.
   bei FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 1169.
   bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 1190.
   bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 527.
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 533.
   bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 639.
   bei System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   bei System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext`1 c)
   bei System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   bei System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   bei System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
   bei System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   bei System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   bei System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   bei System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__6()
   bei System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   bei System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
   bei System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   bei System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   bei System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
   bei System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   bei System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   bei System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
   bei System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   bei System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
   bei System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
   bei System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
System.Data.Entity.Core.EntityCommandExecutionException:执行命令定义时出错。有关详细信息,请参见内部异常。-->FirebirdSql.Data.FirebirdClient.FbException:数据库的打开句柄过多-->FirebirdSql.Data.Common.ISCEeption:数据库的打开句柄过多
bei FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ProcessResponse(IResponse响应)位于C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:Zeile 641中。
C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.ReadResponse()中的bei FirebirdSql.Data.Managed.Version10.GdsDatabase.ReadResponse()。
C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10.GdsDatabase.ReadGenericResponse()中的bei FirebirdSql.Data.GdsDatabase.ReadGenericResponse()。
bei FirebirdSql.Data.Client.Managed.Version11.GdsStatement.Prepare(字符串commandText)在C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version11\GdsStatement.cs:Zeile 80中。
bei FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(布尔返回集)在C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 1169中。
C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior行为,布尔返回集)中的bei FirebirdSql.Data.FirebirdClient.FbCommand(CommandBehavior行为,布尔返回集):Zeile 1190。
C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FbCommand.ExecuteReader(CommandBehavior行为)中的bei FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 527。
---我们的国际关系---
C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FbCommand.ExecuteReader(CommandBehavior行为)中的bei FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 533。
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavior行为)在C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs:Zeile 639中。
bei System.Data.Common.DbCommand.ExecuteReader(CommandBehavior)
bei System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.b_uÈc(DbCommand t,DbCommandInterceptionContext`1c)
bei System.Data.Entity.Infrastructure.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget,Func`3操作,TInterceptionContext拦截Context,执行操作`3,执行操作`3)
bei System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand命令,DbCommandInterceptionContext interceptionContext)
bei System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior)
bei System.Data.Common.DbCommand.ExecuteReader(CommandBehavior)
bei System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand EntityCommand,CommandBehavior)
---我们的国际关系---
bei System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand EntityCommand,CommandBehavior)
bei System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext上下文,ObjectParameterCollection参数值)
bei System.Data.Entity.Core.Objects.ObjectQuery`1.c__显示类7.b__6()
bei System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 Func,IDBEcutionStrategy executionStrategy,Boolean startLocalTransaction,Boolean ReleaseConnectionUnsuccess)
bei System.Data.Entity.Core.Objects.ObjectQuery`1.c__显示类7.b__5()
bei System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1操作)
bei System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(可为null`1 forMergeOption)
bei System.Data.Entity.Core.Objects.ObjectQuery`1.b__0()
bei System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
bei系统.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1源)
bei System.Data.Entity.Core.Objects.elink.ObjectQueryProvider.b__1[TResult](IEnumerable`1序列)
bei System.Data.Entity.Core.Objects.elink.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1查询,表达式queryRoot)
bei System.Data.Entity.Core.Objects.Elink.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](表达式)
bei System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](表达式)
bei System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1源)

有人能解释一下数据库中打开的句柄太多是什么意思吗?我以前从来没有看到过,而且只看到过。

错误
isc\u too\u many\u handles
或错误335544761的意思是:您使用了太多的句柄

查看Firebird 3代码,(搜索
isc\u too\u many\u handles
),如果Firebird无法为语句、事务、blob或“请求”分配句柄,则会出现此错误,因为您已经在单个连接上分配并使用了65000个(
MAX\u OBJCT\u handles
)句柄。请注意,此数字同时适用于连接上的所有句柄(不是每种类型)

如果您执行了太多以下操作,则可能会发生这种情况:

  • 在不删除(关闭)语句句柄的情况下创建新语句句柄