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);

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.


If I want to maximize the Concurrent "wsHttp" CoreService Client Instances, what do I need to do?


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()

Exception In Script (Using Endpoint:netTcp_2013): enter image description here

Exception In Script (Using Endpoint:wsHttp_2013): enter image description here


I did notice that in the file [tridion_home]\webservices\Web.config, there is also a setting that sets this maximum to 100

        <behavior name="Tridion.ContentManager.ServiceHost.IISHost.CoreServiceBehavior">
          <serviceThrottling maxConcurrentCalls="16" maxConcurrentSessions="100" />
          <serviceMetadata httpGetEnabled="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />

Does changing this value results have any effect on your test-app ?

I also noticed from the documentation you link to as well (link) that "The default is 100 * processor count".

  • We set the maxConcurrentSessions, that Saurabh mentioned, down to 10. The core service still became unresponsive after core service objects were instantiated. Either we have the wrong setting, or 100 is the system minimum (possibly both). Sep 22 '17 at 13:23
  • @Paul: Harald is talking about a different config. I will run my tests updating these values and update. Sep 22 '17 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.