Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to communicate fast and often between two .NET processes

Tags:

.net

wcf

vb6

So I have the following setup:

  • a VB6 Application using a .NET dll on the one hand
  • a .NET Service on the other end

The VB6 application uses a small interface dll to communicate to our new infrastructure (servies etc) and can hardly be changed in functionality. We choose to use WCF with a binding like this

<system.serviceModel>
    <client>
      <endpoint address="net.tcp://localhost:8001/HostCommunicator" binding="netTcpBinding" bindingConfiguration="NETTcpBinding" contract="IHostCommunicationContract"/>
    </client>

    <bindings>
      <netTcpBinding>
        <binding name="NETTcpBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00" sendTimeout="00:10:00">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
          <security mode="Transport">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
</system.serviceModel>
  <startup>

to communicate.

This works fine and fast for single requests but one mode of the VB6 Application is a kind of batch mode where it sends an individual request for each file it processes. There will be about 1-4 requests per second.

This works fine until a number of requests is done. On my current machine and software version this are 50 requests. If I start the VB6 application over it does 50 requests again. After the limit the application hangs at 99% CPU usage.

We are using a duplex channel contract.

like image 497
Zebi Avatar asked Aug 01 '11 15:08

Zebi


1 Answers

Have you remembered to close your connections? It looks like you are not closing the connections, just opening new ones for each request?

like image 173
Erik A. Brandstadmoen Avatar answered Sep 19 '22 13:09

Erik A. Brandstadmoen