Tridion 事件系统超时 [英] Tridion Event System Timeout

查看:19
本文介绍了Tridion 事件系统超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在运行 Tridion 2011 SP1.

I am currently running Tridion 2011 SP1.

我正在编写一些在发布页面时运行的代码.它遍历页面中的每个组件模板,获取组件并将各种字段写入 XML 文档.对于具有许多组件模板或具有许多字段的组件的页面,此过程可能需要一段时间才能运行.如果该过程需要超过 30 秒,我会收到错误

I am writing some code that runs whenever a page is published. It loops through each component template in the page, gets the component and writes out various fields to an XML document. For pages with many component templates or components with many fields this process can take a while to run. If the process takes more than 30 seconds I get an error

The operation performed by thread "EventSystem0" timed out.

Component: Tridion.ContentManager
Errorcode: 0
User: NT AUTHORITY\NETWORK SERVICE

被另一个人关注

Thread was being aborted.


Component: Tridion.ContentManager
Errorcode: 0
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at Tridion.ContentManager.Extensibility.EventSubscription.DeliverEvent(IEnumerable`1 subjects, TcmEventArgs eventArgs, EventPhases phase)

我相信我有三个选择.

1.增加超时时间

这似乎是一个懒惰的解决方案,只会隐藏问题.不能保证超时问题不会再次发生.我也不确定超时值的存储位置(我尝试更改 Tridion Content Manager.msc 管理单元中的一些值,但没有成功).

This seems like a lazy solution and only hides the problem. There is no guarantee that the timeout problem won't reoccur. I'm also not sure where the timeout value is stored (I've tried changing a few values in the Tridion Content Manager.msc snap-in but no luck).

2.在实际的事件处理程序中少做一些事情,让一个单独的进程来完成所有艰苦的工作

这似乎也不是正确的解决方案.我真的很想把我所有的事件处理程序代码放在一个地方.我们为我们的 5.3 实时安装提供了这样的解决方案,并且维护起来是一场噩梦(它非常陈旧且写得不好).

This doesn't seem like the correct solution either. I would really like to keep all my event handler code in the one place. We have a solution like this in place for our live 5.3 installation and is a nightmare to maintain (it is very old and poorly written).

3.让我的代码更有效率

我的组件有很多字段,如果它们是 ComponentLinks,我的代码必须深入研究每个字段.我猜是因为 Tridion 对象的属性是延迟加载的,所以我访问的每个属性都会调用一次 API/数据库.检索一个在访问多个属性时很快就会堆积起来的属性平均需要 0.2 秒.如果有一种方法可以在一次调用中检索所有属性,这将非常有用.

My components have many fields and my code must delve deeper into each field if they are ComponentLinks. I guess because the properties of Tridion objects are lazy loaded there is one call to the API/database for each property I access. It takes on average 0.2 seconds to retrieve a property which soon stacks up when accessing multiple properties. If there was a way to retrieve all properties in one call this would be useful.

有什么想法吗?

推荐答案

SDL 客户支持建议我增加超时时间.虽然不是一个很好的解决方案,但它是唯一可用的解决方案.这样做

SDL Customer Support have advised that I increase the timeout. While not a great solution its the only one that is available. To do this

  1. 在安装了内容管理器的服务器上打开 Tridion.ContentManager.config,它应该位于内容管理器根位置的 config/ 子目录中,默认为 C:\Program Files\Tridion\ 或 c:\Program Files (x86)\Tridion\
  2. 找到节点
  3. threadtimeout 值(以秒为单位)增加到更高的值(我将其设置为 120)
  4. 保存Tridion.ContentManager.config 并重启Tridion Content Manager Service Host 服务
  1. On the server that the content manager is installed open the Tridion.ContentManager.config which should be located in the config/ subdirectory of the Content Manager root location, which defaults to C:\Program Files\Tridion\ or c:\Program Files (x86)\Tridion\
  2. Find the <eventSystem> node
  3. Increase the threadtimeout value (this is in seconds) to something higher (I put it to 120)
  4. Save the Tridion.ContentManager.config and restart the Tridion Content Manager Service Host service

提供更多文档

Further documentation is available http://sdllivecontent.sdl.com/LiveContent/web/pub.xql?action=home&pub=SDL_Tridion_2011_SPONE&lang=en-US#addHistory=true&filename=ConfiguringEventSystem.xml&docid=concept_48C53F76CBFD45A783A3975CA72ECC49&inner_id=&tid=&query=&scope=&resource=&eventType=lcContent.loadDocconcept_48C53F76CBFD45A783A3975CA72ECC49. It does require a username and password to access.

这篇关于Tridion 事件系统超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆