也许你们中的任何一个都可以帮助我解决这个烦人的问题。 我有很长时间运行的工作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。
Laravel宅基地vhostconfiguration
在apt-get更新期间,stream浪者进入中止状态
stream氓SSH失败与Ubuntu / xenial64
在windows中RotatingfileHandler“文件忙”
错误安装与stream浪汉和图书pipe理员厨师nochef插件的食谱
任何想法find这种行为或解决方法的根本原因是受欢迎的。 我已经采取了第一个解决方法,即禁用睡眠模式…
Apache无法启动Vagrant
testing厨房login命令失败
Emacs tramp在linux上编辑windows上的远程文件
托盘应用程序允许系统在注销或退出时杀死我的程序
Centos kernel-devel安装后不可用
我认为这种行为的原因是,工作流实例存储应该定期通知数据库它仍然活着(由HostLock@R_685_5026@Period属性定义)。 当计算机处于睡眠模式时,它不能更新LockOwnerstable的LockExpiration列,工作流实例存储被视为不可用。
解决方案是在计算机从睡眠模式恢复时重新启动实例存储。 您可以通过注册Microsoft.Win32.SystemEvents.PowerModeChanged事件来检测。
总结以上是内存溢出为你收集整理的Windows从睡眠中返回后发生InstanceOwnerException全部内容,希望文章能够帮你解决Windows从睡眠中返回后发生InstanceOwnerException所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)