WF4 出现间歇性 InstanceOwnerException

发布于 2024-10-14 02:38:55 字数 1586 浏览 4 评论 0原文

我正在 worflow Foundation 4 中运行工作流,并使用 SQL Durable 实例来实现持久性。

有时,我在恢复工作流程时遇到 System.Runtime.DurableInstancing.InstanceOwnerException。

System.Runtime.DurableInstancing.InstanceOwnerException occurred

  Message="The execution of an InstancePersistenceCommand was interrupted because the instance owner registration for owner ID 'd2db07fd-f31d-458c-be53-de163d5db8d4' has become invalid. This error indicates that the in-memory copy of all instances locked by this owner have become stale and should be discarded, along with the InstanceHandles. Typically, this error is best handled by restarting the host."

  Source=System.Runtime.DurableInstancing

  StackTrace:
       à System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       à System.Runtime.DurableInstancing.InstancePersistenceContext.ExecuteAsyncResult.End(IAsyncResult result)
       à System.Runtime.DurableInstancing.InstancePersistenceContext.OuterExecute(InstanceHandle initialInstanceHandle, InstancePersistenceCommand command, Transaction transaction, TimeSpan timeout)
       à System.Runtime.DurableInstancing.InstanceStore.Execute(InstanceHandle handle, InstancePersistenceCommand command, TimeSpan timeout)
       à System.Activities.WorkflowApplication.PersistenceManager.Load(TimeSpan timeout)
       à System.Activities.WorkflowApplication.LoadCore(TimeSpan timeout, Boolean loadAny)
       à System.Activities.WorkflowApplication.Load(Guid instanceId, TimeSpan timeout)
       à System.Activities.WorkflowApplication.Load(Guid instanceId)

有没有办法避免这种异常?

I'm running workflows in worflow foundation 4 with SQL Durable instancing for persistence.

Sometimes, I'm getting System.Runtime.DurableInstancing.InstanceOwnerException when resuming a workflow.

System.Runtime.DurableInstancing.InstanceOwnerException occurred

  Message="The execution of an InstancePersistenceCommand was interrupted because the instance owner registration for owner ID 'd2db07fd-f31d-458c-be53-de163d5db8d4' has become invalid. This error indicates that the in-memory copy of all instances locked by this owner have become stale and should be discarded, along with the InstanceHandles. Typically, this error is best handled by restarting the host."

  Source=System.Runtime.DurableInstancing

  StackTrace:
       à System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       à System.Runtime.DurableInstancing.InstancePersistenceContext.ExecuteAsyncResult.End(IAsyncResult result)
       à System.Runtime.DurableInstancing.InstancePersistenceContext.OuterExecute(InstanceHandle initialInstanceHandle, InstancePersistenceCommand command, Transaction transaction, TimeSpan timeout)
       à System.Runtime.DurableInstancing.InstanceStore.Execute(InstanceHandle handle, InstancePersistenceCommand command, TimeSpan timeout)
       à System.Activities.WorkflowApplication.PersistenceManager.Load(TimeSpan timeout)
       à System.Activities.WorkflowApplication.LoadCore(TimeSpan timeout, Boolean loadAny)
       à System.Activities.WorkflowApplication.Load(Guid instanceId, TimeSpan timeout)
       à System.Activities.WorkflowApplication.Load(Guid instanceId)

Is there a way to avoid this exception?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不必你懂 2024-10-21 02:38:55

这通常是由于先前的运行未正常完成并在原始锁定到期之前重新启动的结果。这是由于编辑/调试/编辑周期还是在生产环境中发生的?

您可以使用 HostLockRenewalPeriod 设置来调整锁定期限。请记住,将其设置为真正的低值通常不是一个好主意。

This is usually the result of a previous run not completing normally and being restarted before the original lock expires. Is this happening as the result of a edit/debug/edit cycle or in a production environment?

You can adjust the lock period using the HostLockRenewalPeriod setting. Keep in mind that setting it to a real low value is normally not a good idea.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文