none
AppFabric MaxConnections crashes website if present. RRS feed

  • Question

  • I have a Web.API site that talks to a local WCF WF Service Hosted in AppFabric/IIS 8.0 - Server 2012

    The MVC controller has a service reference to the local .xamlx service

    Here is the ServiceModel Part of the Service config:

    <system.serviceModel> <bindings> <netNamedPipeBinding> <binding name="NetNamedPipeBinding.IVoiceService" maxBufferSize="65536" maxConnections="100"> <security mode="None" /> </binding> </netNamedPipeBinding> </bindings> <client> <endpoint address="net.pipe://localhost/Main.xamlx" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_.IVoiceService" contract="Voice.IVoiceService" name="NetNamedPipeBinding.IVoiceService" /> </client> </system.serviceModel>

    WCF WF Service Model section:

      <system.serviceModel>
        <bindings>
         <netNamedPipeBinding>
            <binding name="pipeSecurityOff" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" maxReceivedMessageSize="65536">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <security mode="None">
                <transport protectionLevel="None" />
              </security>
            </binding>
          </netNamedPipeBinding>
        </bindings>
        <services>
          <service behaviorConfiguration="MEX" name="Main">
            <endpoint address="MEX" binding="mexHttpBinding" contract="IMetadataExchange" />
            <endpoint address="MEX" binding="mexTcpBinding" contract="IMetadataExchange" />
            <endpoint address="" binding="netNamedPipeBinding" bindingConfiguration="pipeSecurityOff" contract="NYRA.IVoiceService" />
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="MEX">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
              <sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="NoRetry" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
              <workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
              <workflowUnhandledException action="AbandonAndSuspend" />
              <workflowIdle timeToPersist="00:00:00" timeToUnload="00:00:00" />
              <etwTracking profileName="Troubleshooting Tracking Profile" />
              <serviceThrottling maxConcurrentCalls="256" maxConcurrentSessions="800" maxConcurrentInstances="928" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true">
        </serviceHostingEnvironment>
      </system.serviceModel>
    

    So, If you noticed the MaxConnections property is missing from the binding:

    <binding name="pipeSecurityOff" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" maxReceivedMessageSize="65536">
    

    If I open up IIS 8.0 and Edit the Endpoint, goto the performance tab and change max connections from 10 to 100. it updates the web.config with:

    <binding transactionFlow="false" maxBufferSize="65536" maxConnections="100" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" hostNameComparisonMode="StrongWildcard" transactionProtocol="OleTransactions" transferMode="Buffered" name="pipeSecurityOff" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00">

    Now I get an error: This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented  the webpage from displaying. The logs show:

    <Message>There is no compatible TransportManager found for URI 'net.pipe://myuritemp/Main.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement'. This may be because you have used an absolute address that points outside of the virtual application, or the binding settings of the endpoint do not match those that have been set by other services or endpoints. Note that all bindings for the same protocol should have the same settings in the same application.</Message>
    It seems you should be able to change this property:

    http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.maxconnections.aspx

    Why does adding this attribute to the binding crash the server?  How can I increase the named pipe connections for better performance?

    Tuesday, July 2, 2013 6:53 AM

Answers

All replies