Use the search and browse feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Search Solutions Results By: View All Solutions

Kepware Knowledge Base: Solution


Why Is There a Limit on the Number of OPC .Net Clients that Can Connect to the Server?


Last Update: 11/12/2018
Problem:
A user has several OPC .Net clients to connect to the server, but notices it fails after connecting five clients.

Possible Cause:
The OPC .Net interface is designed around the Windows Communication Foundation (WCF) framework. The default setting supports 16 concurrent sessions, calls, and instances. This framework assumes that there is one CPU. OPC .Net clients consume two sessions for each client connection.

Solution:
Edit the OPC .Net Interface's configuration file to increase the number of available connections. This amount is based on the number of CPUs available in the PC. Set the throttling properties to a value greater than 16 times the number of CPUs. For example, if the PC on which the server is running has 8 CPUs, the value would be greater than 16*8 (128). For more information, refer to the example instructions below (which assume that an 8 CPU PC is being used).

1. To manually change the settings, first open "xi_server_runtime.exe.config" (located at ProgramData\Kepware\KEPServerEX\V5\Xi) in an XML editor or Notepad.
2. Next, locate the element <behavior name="XiServer"> in the file. Then, insert the following:
<serviceThrottling
maxConcurrentCalls="200"
maxConcurrentSessions="200"
maxConcurrentInstances="200" />

Note: For more information, refer to Microsoft MSDN's Optimizing WCF Web Service Performance.