7

I am seeing a lot of error in the event viewer of a publisher box.

Could anyone help me out?

Retrieving the COM class factory for component with CLSID {9926D1CF- F158-418F-A9A2-B653B497D982} failed due to the following error: 800700a4 No more threads can be created in the system. (Exception from HRESULT: 0x800700A4).

  • Tridion version: 2011 SP1.
  • I am getting this error on publish action.
  • Publishing pages using TDSE using C# code.
4
  • This is an incomplete question, can you please let us know the following: 1. Which Tridion version are you using 2. Are you getting these errors on a specific action (publishing etc.)or even without any action 3. If it is the publishing process (assumed), are you using a default Tridion publishing process or it has been overridden through Event System, Storage Extension or deployer extension etc. Mar 29, 2013 at 6:23
  • Please post code. Are you using Marshal.ReleaseComObject?
    – robrtc
    Mar 29, 2013 at 6:46
  • I agree with @robrc, looks like there is a problem with your template code, if you can try to reproduce it with a single template, then please post the code for that template so we can give a structured answer Mar 29, 2013 at 7:53
  • Also do you only see this when publishing multiple items? Can you provide the complete error stack from the Event Viewer? There is a known thread issue with transport where you see an error in both the Publisher and Transport via the Event Viewer. But you will also see the items get stuck in 'Ready to Transport' state. On 2011 SP1 + HR1, there is a Hotfix CD_2011.1.1.83136 to address this. This just may be an additional issue you can run into. Keep in mind if the template issue is not what really is the cause here.
    – Amit Mehta
    Mar 29, 2013 at 18:37

3 Answers 3

6

I'll start with the obvious... Using COM with c# Interops in Templates is not a supported scenario.

Now, moving forward, it is clear that something in your templates might be doing a lousy job of releasing resources once they're used. In the good old VBScript days we would do something like this in our code:

Dim someObject
Set someObject = CreateObject("someobject")
' some logic
' some more logic
Set someObject = Nothing

This would release the object and make sure our code was clean and properly released. With c# and COM Interops you still need to make sure your COM references are released, even if some Microsoft documentation suggests that this is not needed (in my experience, .NET 1.1 interops had a lot less issues with this than anything after .NET 2.0).

You can achieve the same result by using:

object someobject = new object();
// some logic
// some more logic
Marshal.ReleaseComObject(someobject);

Be careful with how you use this. Marshal.ReleaseComObject will return an int with the number of current references to that same object. Do NOT fall into the temptation of releasing them all, as you will start getting errors related to "object is not available anymore".

COM Marshalling is not that hard to start using, but pretty hard to use correctly. Ideally, move your code to TOM.NET or, if this is not an option, try to stick to using a native COM language when dealing with the COM Object Model.

2

I came upon a similar problem when I was using publishing with a lot of idle time. In my case, I was publishing every 45 minutes but nothing in between and in a few days I was getting this error from the Transport Service. After installing hotfix CD_2011.1.1.81083 on Transport side, the error was gone. Can you check with Tridion Customer Support if this applies to you also?

Cheers.

1

In that case, ensure following:

  1. Are you freeing up the resources by release/disposing the COM Interop

  2. Monitor the resource utilization

  3. Apart from COM, ensure there is no memory leak in your C# code

Also, try restarting the COM+ application and Tridion Publisher Service and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.