Experts,
I was doing a simple test for maximum Concurrent Coreservice Instances. I observed that I could only create 100 concurrent Instances and 101th fails with errors mentioned at the bottom of the question. The Goal of this exercise is to control the Concurrent Coreservice Instances (which is 100 by default, I just want to increase or decrease it).
To create the test scenario, I wrote a simple C# CoreService Script as below:
for (int i = 1; i < 150; i++)
{
// I have used both wsHttp_2013 and netTcp_2013 endpoints
SessionAwareCoreServiceClient client_Test = new SessionAwareCoreServiceClient("netTcp_2013 ");
var testPub = (PublicationData)client_Test.Read("tcm:0-10-1", new ReadOptions());
Console.WriteLine(i + "-" + testPub);
// I AM NOT CLOSING THE CORE SERVICE CLIENT HERE
}
As I mentioned above the script fails in 101th attempt.
I can see, there is a config file for the CoreService Host named “TcmServiceHost.exe.config” at the location “{TridionDir}\bin”. This file have a configuration for service throttling
<!-- NOTE: default serviceThrottling settings in .NET 4.5: maxConcurrentSessions=100*<CPU count>, maxConcorrentCalls=16*<CPU count> and maxConcurrentInstances=maxConcorrentCalls+maxConcurrentSessions-->
<!-- So, the defaults provided here assume a single CPU; they should be increased in case server CPU utilitization is considered too low. -->
<serviceThrottling maxConcurrentSessions="100" maxConcurrentCalls="16" />
updating the values in above configuration, solve the issue with "netTcp" coreservices client and I can control the number of concurrent instances but this does not have any effect on "wsHttp" client instances.
Question:
If I want to maximize the Concurrent "wsHttp" CoreService Client Instances, what do I need to do?
Errors
In Event Viewer:
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '03:00:00'. An existing connection was forcibly closed by the remote host Component: Tridion.ContentManager.CoreService Errorcode: 0 User: NT AUTHORITY\NETWORK SERVICE StackTrace Information Details: at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing) at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing) at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout) at System.ServiceModel.Channels.ServerSessionPreambleConnectionReader.ServerFramingDuplexSessionChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Dispatcher.ChannelHandler.OpenAndEnsurePump()