locked
net.tcp listener adapter stops responding RRS feed

  • Question

  • User175978769 posted

    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>

    Monday, May 10, 2010 10:47 AM

All replies

  • User2030498984 posted

    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.

    Wednesday, May 12, 2010 8:44 AM
  • User834045982 posted

    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

    Thursday, June 17, 2010 4:04 AM
  • User1728744214 posted

    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

    Wednesday, August 25, 2010 8:01 PM
  • User175978769 posted

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

    Sunday, November 14, 2010 9:35 PM
  • User834045982 posted

     No. Still no solution.

    Thursday, January 13, 2011 10:50 AM
  • User-355887513 posted

    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.

    Friday, June 10, 2011 11:18 PM
  • User1689538101 posted

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

    Thursday, August 18, 2011 2:30 PM
  • User292283630 posted

    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.

    Friday, September 9, 2011 4:48 AM
  • User834045982 posted

    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.

    Friday, September 9, 2011 5:18 AM
  • User-1009551064 posted

    There is a hotfix available for this

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

     

    Wednesday, September 14, 2011 11:42 AM
  • User-1672167363 posted

    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

     

     

    Wednesday, September 14, 2011 2:01 PM
  • User1295077654 posted

    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.

     

    Saturday, December 10, 2011 6:57 AM
  • User-1672167363 posted

    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

     

    Saturday, December 10, 2011 7:21 AM
  • User-1448396985 posted

      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.

     

    Friday, November 29, 2013 4:27 AM
  • User-43038286 posted

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

    Friday, November 18, 2016 6:03 PM
  • User1514269400 posted

    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?

    Wednesday, December 21, 2016 6:54 AM
  • User-94895139 posted

    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 )

    Friday, March 29, 2019 11:41 PM