Microsoft KB Archive/279139

= FIX: COM Servers May Stop Responding Under Heavy Load in MTS and Windows 2000 =

Article ID: 279139

Article Last Modified on 8/7/2007

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition, when used with:
 * Microsoft Windows 2000 Standard Edition

-



This article was previously published under Q279139



SYMPTOMS
A Visual FoxPro Component Object Model (COM) server may stop responding under a heavy load when it is run using Microsoft Transaction Server (MTS) under Windows 2000.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed

To download the latest Visual Studio service pack, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx



Steps to Reproduce Behavior
  Create an Active Server Pages (.asp) page named Mtstest.asp that contains the following code:   <%  lnsecs = Request.QueryString(&quot;delay&quot;) set ox = Server.CreateObject(&quot;myserver.myclass&quot;) response.write ox.cnt %>    Place the .asp page in the Wwwroot folder on a Windows 2000 Web server. On drive C, create a folder called MTSTest. Start Visual FoxPro.</li>  To create a table to use, run the following code: CREATE TABLE C:\MTSTest\Counter FREE (count i)  INSERT INTO counter VALUES (0) USE </li>  Create a project called MyServer, and add the following code to the main program: DEFINE CLASS myclass AS form OLEPUBLIC Datasession=2   && private datasession oScriptingContext=0

PROCEDURE Init SET EXCLUSIVE OFF USE C:\MTSTest\Counter shared ENDPROC PROCEDURE xOnStartPage(p1) ENDPROC

PROCEDURE MyDoCmd(cCmd) &cCmd && Just execute parameter as if it were a Fox command. ENDPROC

FUNCTION MyEval(cExpr) RETURN &cExpr && Evaluate parameter as if it were a Fox expression. ENDFUNC

PROCEDURE cnt(p1) LOCAL cStr REPLACE Counter.count WITH Counter.count+1 cStr = _VFP.fullname+&quot; &quot; cStr = cStr + 'thread id = '+TRANS(_VFP.threadid) + &quot; &quot; cStr = cStr + 'Proc id = '+TRANS(_VFP.processid)+ &quot; &quot; cStr = cStr + ' Count = TRANS(Counter.count)+' ' RETURN cStr ENDPROC

ENDDEFINE </li> Build the COM server.</li> Create a package for the COM server in MTS on the Web server. (For more information, see the &quot;References&quot; section.)</li> Hit Mtstest.asp with multiple threads using the Microsoft Web Application Stress Tool. (For more information, see the &quot;References&quot; section.)</li> Look at the Web Application Stress Tool report. Failures may be listed in the report as well as in the Windows Event Log.</li></ol>

<div class="references_section">