We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

net.tcp listener adapter stops respondingRSS

17 replies

Last post Mar 29, 2019 11:41 PM by techienumberone

  • net.tcp listener adapter stops responding

    May 10, 2010 10:47 AM|dnknitro|LINK

    Hi,

    I have following configuration:

    WCF services are hosted  on IIS7 on Windows Server 2008. Net.tcp binding is used.

    In production there are about 200 users working with local client application (WinForms) which connects to the fore-mentioned WCF services.

     

    This can work fine for days or weeks, but occasionally WCF services stop responding. Apppool recycling do not help.

    When I restart "net.tcp listener adapter" windows service - the application become responsive again.

     

    Please help... Any ideas why this happens are very welcome, thanks ahead!

     

    The server WCF configuration is below:

        <system.serviceModel>
            <diagnostics performanceCounters="All"/>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="serviceBehavior">
                        <serviceMetadata httpGetEnabled="false"/>
                        <serviceDebug includeExceptionDetailInFaults="true"/>
                        <dataContractSerializer maxItemsInObjectGraph="10000000"/>
                        <serviceAuthorization principalPermissionMode="Custom">
                            <authorizationPolicies>
                                <add policyType="CustomAuthorizationPolicyImplementation"/>
                            </authorizationPolicies>
                        </serviceAuthorization>
                        <serviceCredentials>
                            <windowsAuthentication includeWindowsGroups="false" allowAnonymousLogons="false"/>
                        </serviceCredentials>
                        <errorHandlerExtension/>
                        <endpointServerMessageInspector/>
                        <serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000" maxConcurrentInstances="1000"/>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <extensions>
                <behaviorExtensions>
                    <add name="customServiceBehavior" type="CustomExtensionImplementation"/>
                    <add name="errorHandlerExtension" type="CustomExtensionImplementation"/>
                    <add name="endpointClientMessageInspector" type="CustomExtensionImplementation"/>
                    <add name="endpointServerMessageInspector" type="CustomExtensionImplementation"/>
                </behaviorExtensions>
            </extensions>
            <bindings>
                <netTcpBinding>
                    <binding transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="1000000000" openTimeout="00:01:00" closeTimeout="00:00:30" sendTimeout="00:04:30" receiveTimeout="00:05:00" listenBacklog="1500" maxConnections="1000" name="netTcpServerBinding">
                        <readerQuotas maxArrayLength="900000" maxBytesPerRead="900000" maxDepth="900000" maxNameTableCharCount="900000" maxStringContentLength="900000"/>
                        <reliableSession ordered="true" enabled="true" inactivityTimeout="00:05:00"/>
                        <security mode="Transport">
                            <message clientCredentialType="Windows"/>
                        </security>
                    </binding>
                    <binding transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="1000000000" openTimeout="00:01:00" closeTimeout="00:00:30" sendTimeout="00:04:30" receiveTimeout="00:05:00" transferMode="Streamed" listenBacklog="1500" maxConnections="1000" name="netTcpServerBindingNoReliableSession">
                        <readerQuotas maxArrayLength="900000" maxBytesPerRead="900000" maxDepth="900000" maxNameTableCharCount="900000" maxStringContentLength="900000"/>
                        <reliableSession ordered="true" enabled="false" inactivityTimeout="00:05:00"/>
                        <security mode="Transport">
                            <message clientCredentialType="Windows"/>
                        </security>
                    </binding>
                </netTcpBinding>
            </bindings>
         </system.serviceModel>

    net.tcp listener adapter stops responding

  • Re: net.tcp listener adapter stops responding

    May 12, 2010 08:44 AM|marten.jung|LINK

    Hi,

    we are facing exactly the same problem with IIS7, Server 2008 Standard 64bit and WCF-Services using net.tcp binding.
    We are using .NET Framwork 4.0 64bit and after a few minutes or hours of usage net.tcp does not respond any more.
    But we can call the services at that point using another binding, say wsHTTP. Even restarting IIS does not help  - net.tcp does not respond.

    Restarting the windows service "net.tcp listener adapter" seems to be the only solution to get net.tcp back up again.

  • Re: net.tcp listener adapter stops responding

    Jun 17, 2010 04:04 AM|Adrian B.|LINK

    Hi all.

    We are also facing exactly the same problem described above. We can solve the issue by restarting the "net.tcp listener adapter" manually.

    Depending on the load we must do this once per day - This should not be the way in my opinion.

    Can someone from Microsoft team give a feedback on that issue?

     All the best.

     Adrian

  • Re: net.tcp listener adapter stops responding

    Aug 25, 2010 08:01 PM|d.zeng|LINK

    Hi,

     We are having the same problem here. All WCF services can work fine for a few days, then randomly the server stops responding. I ran "netstat -a -o" on the server when it stoped responding. The port 9000 (This is the port we use to host net.tcp services under IIS WAS) was up and listened by Net.Tcp Listener Adapter.

    There isn't any error logged in the event viewer on the server.

    This issue happens in a development environment (5 people) which doesn't generate heavy load on the server.

    Restarting the Net.Tcp listener Adapter or executing IISRESET can fix the problem. But you dont want to do this in the production environment too often.

    Thanks,

    Daniel

  • Re: net.tcp listener adapter stops responding

    Nov 14, 2010 09:35 PM|dnknitro|LINK

     It looks like this problem is still unresolved. Any new comments on this?

  • Re: net.tcp listener adapter stops responding

    Jan 13, 2011 10:50 AM|Adrian B.|LINK

     No. Still no solution.

  • Re: net.tcp listener adapter stops responding

    Jun 10, 2011 11:18 PM|idof|LINK

    If i'm not mistaken, this is due to a bug in the shared tcp listener service. That windows service communicates with your service host using named pipes. I noticed that at some point the name pipes endpoint in the shared listener creates a lock that is not released, making all incomming calls to not be handled. This is why only a reset of the windows service makes things work again.

    I think the best way to find why it happens is to get to the point the service doesn't work, and product a dump file of the shared listener windows service (before restarting it). Then ask someone who knows how to use windbg to check locks in the dump in order to understand their origin and optionally, how to solve that problem.

  • Re: net.tcp listener adapter stops responding

    Aug 18, 2011 02:30 PM|kevinbky|LINK

    any more update on this issue? I am having the same problem in production.

  • Re: net.tcp listener adapter stops responding

    Sep 09, 2011 04:48 AM|havana7.net|LINK

    We have the same problem on a high-traffic web site.

    I made a  batch like this:

    net stop "Net.Tcp Listener Adapter"
    net start "Net.Tcp Listener Adapter"

    to run every 5 minutes.

    It's frustrating.

    Please let me know if you find a solution.

  • Re: net.tcp listener adapter stops responding

    Sep 09, 2011 05:18 AM|Adrian B.|LINK

    Hi.

    I would suggest using IIS 7.5 and/or Microsoft Appfabric for hosting net.tcp wcf webservices.

     After we switched to this we faced no problems anymore so far.

     All the best.

     A.

  • Re: net.tcp listener adapter stops responding

    Sep 14, 2011 11:42 AM|sunili|LINK

    There is a hotfix available for this

    http://support.microsoft.com/kb/2504602

     

  • Re: net.tcp listener adapter stops responding

    Sep 14, 2011 02:01 PM|HCamper|LINK

    Hi,

    You start by check the  Windows Update section in the Control Panel

    under updates for WCF and Net Frameworks for 2.0 3.5.1 and Net 4.0 you may be missing some of the

    latests Patches example:  http://support.microsoft.com/kb/971831  there are more updates then shown.

    You might also check the MSDN Archive Gallery http://archive.msdn.microsoft.com/ many of the Hot Fixes

    are there for download. General Note: Read the notes and Support Bulletins and only install the Host Fixes

    for the particular problem. If the Host fix does not resolve the problem you should consider uni-install.

    Martin

     

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: net.tcp listener adapter stops responding

    Dec 10, 2011 06:57 AM|Peter2070|LINK

    Net.tcp listener adapter still stops responding ( hangs, crashes ) in our setup.
    We have applied the hotfix KB2504602, and checked it was installed by checking the relevant file dates/times.

    We have a WCf service using netTcpBinding, in a web garden setup. We have a process-wide Mutex lock in the service, to allow only one thread at a
    time in a process ( see below ). Further threads throw an exception when they cannot aquire the lock. The client then retries the service method,
    and WAS usually starts a new process in the web garden after a few requests, where the previously blocked request can run. ( Was does not start new processes in this way if connecting via wsDualHttpBinding.)

    After a while, though, when several requests have been completed, WAS stops creating new processes, even when there is only currently one process in the web garden. When everything has finished, it is not possible to connect to the service. Restarting the Net.tcp listener adapter service
    fixes the problem, although we don't want to have to do this.

    Further setup details:
    Service uses compiled 3rd-Party calculation engine, which only allows 1 thread per process.
    Windows Server 2008 R2 with all latest Windows Updates.
    Service Loads large datasets from SQL Server 2008 using LINQ to SQL and processes them using LINQ to Objects.
    Frequent forced garbage collections due to rapidly changing large dataasets, although the problem still occurs if these are removed from the code.
    3rd-PArty dll, which may be C++/CLI, to load some data initially at start of service.

     

    wcf was hangs Net.tcp Listener Adapter netTcpBinding web garden restart service

  • Re: net.tcp listener adapter stops responding

    Dec 10, 2011 07:21 AM|HCamper|LINK

    Hello,

    To get help with Windows Communications Foundation problems & issues:

     https://connect.microsoft.com/wcf login to the connect and use the Feed Back

    and the Experts for WCF will Use the information you provide for suggestion or provide fixes.

    Regards,

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: net.tcp listener adapter stops responding

    Nov 29, 2013 04:27 AM|Michael T. Burger|LINK

      In a similar scenario (needed to stop listener adapter during application start) I had the trouble that Port Sharing was configured in IIS with ASP.NET 4.0 but WCF 3.0 was repaired afterwards using 

    "c:\Windows\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r (CAUSE!)

    By repairing WCF 4.0 I could solve this issue and my application could access the shared port correctly.

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\ServiceModelReg.exe" -r (SOLUTION)

    Probably this command needs to be repeated in  c:\Windows\Microsoft.NET\Framework as well.

     

  • Re: net.tcp listener adapter stops responding

    Nov 18, 2016 06:03 PM|LextheDewey|LINK

    I had a similar issue w/ this, noticed that Net.TCP Port Sharing Service was disabled, so i set that to automatic, then net.tcp listening adapter started right up for me. My issue was that I couldn't start it fully. Hope this helps someone out there :)

  • Re: net.tcp listener adapter stops responding

    Dec 21, 2016 06:54 AM|suparnapal|LINK

    I am facing similar problem in .NET Framework 4.5.2 as well. Can anyone tell me, above mentioned hotfix already included within .NET Framework 4.5.2 package as well?

  • Re: net.tcp listener adapter stops responding

    Mar 29, 2019 11:41 PM|techienumberone|LINK

    I found that if you goto services click properties on it click auto

    then click start

    there is a thing in the properties called recovery

    look in here to see if take no action on any of the listings

    change this to restart service

    click ok

    on all to get out of service option

    problem solved

    (techienumber1 for you still the best )