The function of the SESSTIMEOUT parameter has changed somewhat betweenMicrosoft LAN Manager 2.x and Windows NT. In LAN Manager, SESSTIMEOUTis the maximum amount of time that the redirector waits for a serverto respond to a Server Message Block (SMB). If SESSTIMEOUT expires,the session is disconnected. In Windows NT, SESSTIMEOUT is only partof the time-out equation.
Windows NT uses a dynamic SMB response timer algorithm. The time-outcan be changed on a per-SMB basis. The redirector uses someintelligence to calculate a proper time-out. Using a new TDI API call,[TDIQueryConnectionInfo], the redirector can determine the bytes persecond rate of the media. It also knows the size of the data beingsent or received in the SMB. Using this information, it calculates howlong the SMB response is expected to take. To this value, it addsSESSTIMEOUT, which defaults to 45 seconds.
[(SMB size + the size of data being sent OR the expected data to be read) / bytes per second] + SESSTIMEOUT.
In Windows NT, SESSTIMEOUT can be thought of as a margin for error. Ifthings go wrong or get delayed, the redirector waits an extraSESSTIMEOUT amount before giving up. In LAN Manager, it is theabsolute maximum amount of time to wait.
Currently, there is no way to see the value of the SMB response timerat any one point in time.
SESSTIMEOUT can be set using REGEDT32. It is found underHKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\ LANMANWORKSTATION\PARAMETERS\SESSTIMEOUT. It has a variable type ofREG_DWORD. The value is stored in decimal seconds. The default is 45.Range 10 to 65535 seconds. SESSTIMEOUT is never automaticallyadjusted. If you manually adjust the value it will take effectimmediately.
In addition, SESSTIMEOUT and the SMB Response timer are system-wideparameters. With LAN Manager, SESSTIMEOUT does not apply to TCP/IP. InWindows NT, it applies to all protocols including TCP/IP.
SESSTIMEOUT does not apply to certain types of SMBs. These mostlyconsist of Transaction commands, which have their own time-outvariable in the SMB. SESSTIMEOUT mostly comes into effect on Read andWrite operations.