我正在使用Neo4jClient对Neo4j数据库进行相当长的查询,并得到一个随机发生的异常。如何解决这个问题?

System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.



--- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Neo4jClient.GraphClient.<>c__DisplayClass3.<SendHttpRequestAsync>b__2(Task`1 requestTask) in c:\TeamCity\buildAgent\work\f1c4cf3efbf1b05e\Neo4jClient\GraphClient.cs:line 149
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Neo4jClient.GraphClient.<>c__DisplayClass1b`1.<Neo4jClient.IRawGraphClient.ExecuteGetCypherResultsAsync>b__1a(Task`1 responseTask) in c:\TeamCity\buildAgent\work\f1c4cf3efbf1b05e\Neo4jClient\GraphClient.cs:line 745
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Neo4jClient.GraphClient.<>c__DisplayClass3.<SendHttpRequestAsync>b__2(Task`1 requestTask) in c:\TeamCity\buildAgent\work\f1c4cf3efbf1b05e\Neo4jClient\GraphClient.cs:line 149
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---
<---

最佳答案

https://bitbucket.org/Readify/neo4jclient/issue/70/taskcancelledexception处将其作为问题进行跟踪

诊断和最终的“官方”解决方案将在此处发布。

10-04 10:51