locked
ASP.NET State Service Session Issue RRS feed

  • Question

  • User448321059 posted

    We are experiencing an error "The state server has closed an expired TCP/IP connection. The IP address of the client is 127.0.0.1. The expired Read operation began at 09/14/2018 09:01:31." randomly on one of our windows server which has following OS and IIS versions.

     Windows Server 2008 R2

    IIS 7.5

     Following are the settings in web.config for stateserver.

     <sessionState mode="StateServer" stateNetworkTimeout="120" timeout="120"/>

     We have tried changing the stateNetworkTimeout but issue is still persisted.

     We have an enterprise ambulatory care application developed in mixed ASP Classic (VB6.0 COM ActiveX Components) and ASP.Net 4.0 (C#). Because of this issue our 1000s of users(Doctors) are being affected on daily basis and most of the time they are in the middle of a procedure and application doesnt respond which can be life threatening for their patients.

     We have reviewed our code but didnt find anything and the same application code is running perfectly on other servers. We need your help urgently; please help to get this issue resolved

    Thursday, September 20, 2018 12:16 PM

All replies

  • User1120430333 posted

    We have reviewed our code but didnt find anything and the same application code is running perfectly on other servers. We need your help urgently; please help to get this issue resolved

    Have you tried posting to the IIS forums?

    https://forums.iis.net/

    Thursday, September 20, 2018 12:49 PM
  • User-271186128 posted

    Hi Sir,

    Welcome to asp.net forum.

    We are experiencing an error "The state server has closed an expired TCP/IP connection. The IP address of the client is 127.0.0.1. The expired Read operation began at 09/14/2018 09:01:31." randomly on one of our windows server which has following OS and IIS versions.

    When we use the state server mode of Session state in ASP.NET, the ASP.NET Web server process in the Web server communicates with the state server by using WinSocket over Transmission Control Protocol/Internet Protocol (TCP/IP). By default, the Web server process sets the time-out value of all send and receive TCP/IP operations to 10 seconds. Similarly, the state server also times out all send and receive TCP/IP operations after 10 seconds. 

    However, if either the Web server or the state server is under very high CPU utilization (close to 100 percent), a TCP/IP operation can sometimes take more than 10 seconds and thus is cancelled before it has the chance to finish. As a result, If the state server times out a TCP/IP operation, the state server logs will display the "The state server has closed an expired TCP/IP connection" error.

    To solve this error, you could refer to this solution:

    To modify the TCP/IP operation time-out value for the ASP.NET Web server process, change the following attribute in the Machine.config file (or specify the following attribute in the Web.config file for any Web application).

    <sessionState stateNetworkTimeout="10"/>

    To modify the TCP/IP operation time-out value for the state server, follow these steps:

    1. Stop the ASP.NET state server service.
    2. Click Start, click Run, type Regedt32.exe, and then click OK to start Registry Editor.
    3. Locate the following key in the registry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters

    4. Add a DWORD value that is named SocketTimeout. Set a positive integer to represent the new TCP/IP timeout in seconds.
    5. Quit Registry Editor.
    6. Restart the ASP.NET state server service

    More details, please refer to this link: State server logs Event ID 1072 or Event ID 1076

    Best regards,
    Dillion

    Friday, September 21, 2018 5:24 AM