也许你们中的任何一个都可以帮助我解决这个烦人的问题。 我有很长时间运行的工作stream程,这是长期运行的应用程序使用。
我使用sqlWorkflowInstanceStore进行持久化。
我设置了DefaultInstanceOwner,这样我就可以在应用程序的另一个启动时重新加载工作stream。
InstanceHandle handle = workflowInstanceStore.CreateInstanceHandle(); InstanceView view = workflowInstanceStore.Execute(handle,new CreateWorkflowOwnerCommand(),TimeSpan.FromSeconds(30)); handle.Free(); workflowInstanceStore.DefaultInstanceOwner = view.InstanceOwner;
var deleteOwnerCmd = new DeleteWorkflowOwnerCommand(); InstanceHandle handle = workflowInstanceStore.CreateInstanceHandle(); workflowInstanceStore.Execute(handle,deleteOwnerCmd,TimeSpan.FromSeconds(30)); handle.Free();
在正常的应用程序使用下一切顺利。 如果Windows进入睡眠模式,则会出现问题。 当它从睡眠模式返回时,使用workflowInstanceStore引发任何其他操作:
System.Runtime.DurableInstancing.InstanceOwnerException: The execution of an InstancePersistenceCommand was interrupted because the instance owner registration for owner ID 'GUID' 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.
我查看了LockOwnersTable中的数据库,当系统唤醒时locking过期设置为2000-01-01 00:00:00.000。
在apt-get更新期间,stream浪者进入中止状态
stream氓SSH失败与Ubuntu / xenial64
在Windows中RotatingFileHandler“文件忙”
错误安装与stream浪汉和图书pipe理员厨师nochef插件的食谱
任何想法find这种行为或解决方法的根本原因是受欢迎的。 我已经采取了第一个解决方法,即禁用睡眠模式…
Apache无法启动Vagrant
testing厨房login命令失败
Emacs tramp在Linux上编辑Windows上的远程文件
托盘应用程序允许系统在注销或退出时杀死我的程序
Centos kernel-devel安装后不可用
我认为这种行为的原因是,工作流实例存储应该定期通知数据库它仍然活着(由HostLockrenewalPeriod属性定义)。 当计算机处于睡眠模式时,它不能更新LockOwnersTable的LockExpiration列,工作流实例存储被视为不可用。
解决方案是在计算机从睡眠模式恢复时重新启动实例存储。 您可以通过注册Microsoft.Win32.SystemEvents.PowerModeChanged事件来检测。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。