COM + freezes when calling a COM object under load

We have COM + code written in all our favorite languages ​​(?) - VB6. This COM + component calls a standard COM component written by a third party that makes calls to the SQL Server database. We are not doing anything unusual in COM + - no more than (this is just an example, we really don't call our functions doStuff :-)):

Function doStuff
   Dim o As Library.Object
   Set o = New Library.Object
   str = o.DoSomething()
   Set o = Nothing
   doStuff = str
End Function

Like an awfully fast stress test, we wrapped up the call in simple VBScript, which simply creates an object, calls a method in a loop, sets nothing, and repeats this several times. Then we run four of them at the same time on the command line.

What we experience is four COM + windows stopping dead, as if they were somehow blocking each other. Based on the behavior of the output, it seems that different windows exchange instances of objects somewhere along the way: for example, the speed at which the output appears between the windows synchronizes between the windows ... so the two can bubble up with speed, while the others two spit out a line per second (and when they spit out a line, they do it at the same time).

, , , , - , ( 30, 40 ). dllhost.exe , COM Surrogate ( dllhost).

, , - . , , COM + ": ", . new COM- CreateObject, , ( ). Nothing, COM +, VBScript.

, VBScript ( COM +), . , , , COM + COM-, Component Services, , .

, , ? ?


:

... - COM + COM. script, 10-50 , . , . , , , , COM + STA, MS. Server 2000 Server 2003 1 (SP1): , ...

+3
3

, COM + STA .

Microsoft , " MTS COM +", , , ( ).

, COM + STA 5 STA. ( SQL Server), COM + STA. 5 ( ). , , . / "", - ( ) . .

COM +, COM + MTS 100 STA. . COM+. , . STA.

+2

2 :

  • o , ?

    DoStuff Function Dim o as Library.Object
     Set o = Create a library. Object str = o.DoSomething () Set o = Nothing doStuff = str Final function

  • Are you that the Library.Object component and the .DoSomething method do not contain global variables (or MessageBox statements)?

  • Can you print the logging instructions after each line to see where the code is throttled?

  • Click ProcMon to see when it stops deleting the registry. Has the last call been made? If so, where?

0
source

All Articles