Your Web session has timed out. Please login again

Product:
TM1 9.4 on MS Server 2003 with IIS6

Symptom:
ERROR Applix.TM1.Web.Page.TM1WebPageUtils –

Problem:
A problem occurs when TM1Web session is terminated after (x) minutes and user must login repeatedly.
TM1Web session is terminated after 20 minutes with message “Session timed out. Please login again”.
TM1Web keeps timing out despite increasing TM1 Web Session Timeout.

Cause:
Timeout parameter in web.config and IIS worker process are defined with Default Parameter.
(Web Session Timeout=20 min, IdleConnectionTimeOutSeconds=120 sec, IdleTimeout=20 min).

Timeouts can be configured at three different “levels” (TM1Web & TM1 Server & MS IIS):
1. TM1Web timeout settings – web.config, tm1web web app
2. TM1 Server timeout settings – tm1s.cfg
3. MS IIS settings for timeout of worker processes – IIS w3wp.exe + DefaultAppPool + machine.cfg

The setting in the tm1s.cfg file applies at the server level, while the web.config applies to accessing the virtual directory for TM1Web.
The IdleConnectionTimeOutSeconds will disconnect a user’s TM1 session, while the timeout parameter in the web.config only applies to a user’s connection to the TM1Web website.

Unexpected timeouts may occur when Default Parameter is changed or “Precedence of settings” is causing unexpected behaviour. The setting in the web.config file takes precedence over idle timeout in IIS and machine.config. When timeout is missing in web.config then setting from machine.config takes precedence.

Solution:
To prevent a TM1Web session from timing out configure your Timeout Parameter according to business requirements and “precedence of timeout settings” (best practice is not to change the default parameters).
Check web.config and tm1s.cfg file timeout parameter information. Check if you have a setting in your tm1s.cfg as it could be impacting your timeout if you do (note that no entry = never timeout). IdleConnectionTimeOut Seconds specifies a timeout limit for idle client connections, in seconds.For example, if you include the line IdleConnectionTimeOutSeconds=900 in tm1s.cfg, the server disconnects idle client connections after 900 seconds.

Timeout Parameter in TM1 & Microsoft IIS & TM1Web
0. Increase timeout IdleConnectionTimeOutSeconds (tm1s.cfg) from 900 sec to 7200 sec (= 120 min)
1. Increase timeout of IIS worker process from sec (=20 min) to 7200 sec (= 120 min)
cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName n
2. Increase timeout DefaultAppPool from default 20 min to 120 min
3. Increase timeout TM1 Web Session (web.config) from default 20 min to 120 min
4. httpRuntime executionTimeout=”7200″ (web.config)
6. restart IIS after changing timeout settings

Another category of Session Timeouts, the ones where immediately after logon (or a short time later) the Session Timeout hits the user, is due to the default setting in IIS Version 6 webserver of MS Windows Server 2003:
Go to Control Panel -> Administrative Tools ->IIS Manager -> Application Pool -> Default Application Pool (DefaultAppPool) -> right mouse click to open context menu, selectProperties -> tab Performance -> Web Garden: Maximum number of worker processes -> Change from default value of 4 to 1.

On newer version of TM1 this settings are elsewhere, because TM1 do not use IIS.