Apache Ignite .net 瘦客户端“打开的游标太多”异常

问题描述 投票:0回答:1

针对 ignite 缓存执行 linq 和 SQL 查询的 .net 瘦客户端出现以下异常

Exception:“Apache.Ignite.Core.Client.IgniteClientException:50000:打开的游标太多(关闭其他打开的游标或通过 ClientConnectorConfiguration.maxOpenCursorsPerConnection 增加限制)[maximum=128,current=128] 在 Apache.Ignite.Core.Impl.Client.Cache.CacheClient

2.HandleError[T](ClientStatusCode status, String msg) at Apache.Ignite.Core.Impl.Client.ClientSocket.DecodeResponse[T](BinaryHeapStream stream, Func
2 readFunc,Func
3 errorFunc) at Apache.Ignite.Core.Impl.Client.ClientSocket.DoOutInOp[T](ClientOp opId, Action
1 writeAction,Func
2 readFunc, Func
3 errorFunc) 在 Apache.Ignite.Core.Impl.Client.ClientFailoverSocket.DoOutInOp[T](ClientOp opId, Action
1 writeAction, Func
2 readFunc, Func
3 errorFunc) at Apache.Ignite.Core.Impl.Client.Cache.CacheClient
2.DoOutInOp[T](ClientOp opId, Action
1 writeAction, Func
2 readFunc) 在 Apache.Ignite.Core.Impl.Client.Cache.CacheClient
2.Query[T](SqlFieldsQuery sqlFieldsQuery, Func
3 readerFunc) 在 Apache.Ignite.Linq.Impl.CacheFieldsQueryExecutor.ExecuteSingle[T](QueryModel queryModel,布尔值 returnDefaultWhenEmpty) 在Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteSingleQueryModel [T](QueryModel queryModel,IQueryExecutor执行器) 在Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteQueryModel(QueryModel queryModel,IQueryExecutor执行器) 在 Apache.Ignite.Linq.Impl.CacheFieldsQueryProvider.Execute[TResult](表达式表达式)

客户端应用程序同时使用 Apache.Ignite.Linq 和 SQL 查询 IFieldsQueryCursor

许多 sql 查询使用 Select 子句将 IFieldsQueryCursor 结果转换为 IEnumerable

.net ignite
1个回答
1
投票

如错误所示,您可以更改

ClientConnectorConfiguration.maxOpenCursorsPerConnection
属性(在 Ignite 服务器节点上)以增加可以同时打开的游标数量。

话虽如此,128 听起来已经足够了!您确定在完成后关闭所有光标吗?它们是

IDisposable
,所以最好将它们放入
using
块中。

© www.soinside.com 2019 - 2024. All rights reserved.