How is the User Session Timeout Set?
- Article Type: General
- Product: MetaLib
- Product Version: 4
Description:
How do I set the length of a user's session? What files need to be modified? What is the maximum length possible for a user's session?
Resolution:
MetaLib applies an internal server timeout if a user does not send a request to the server. The default is 15 minutes, measured in seconds (900 seconds). The minimum session timeout is 5 minutes (300 seconds). If a value lower than 300 is defined, the server automatically overrides the defined value with a value of 300 seconds.
Two files control the timeout length:
1) ./metalib_conf/www_server.conf
2) ./insNN/www_v_lng/meta-tags
To change the (/exlibris/metalib/m2_N/metalib_conf/) www_server.conf default timeout:
>> cd $metalib_conf
>> vi www_server.conf
setenv WWW_V_SESSION_TIMEOUT "900"
Change the 900 to the required number of seconds. After applying the change, restart the Web servers:
>> start_w
An error message notifies users that their session has timed out: "Your session has timed out, please login."
The program limits the timeout parameter to 4 digits. This means that the maximum session timeout is 9999 seconds (166 minutes, approximately 2.75 hours). To set the timeout for 2.75 hrs, the parameter would be changed to:
setenv WWW_V_SESSION_TIMEOUT "9999"
In the HTML (/insNN/www_v_eng/) meta-tags file, there is no 4-digit time limit, but the default placeholder should be used so that this timeout will be coordinated with the WWW_V_SESSION_TIMEOUT. The HTML tag instructs the browser to send an end session request to the server after a default screen is idle for a configurable number of seconds. If a user does not perform any action within this period of time, the session times out and the page is redirected to the specified page. The following tag is used:
<meta http-equiv="REFRESH" content="$8500; URL=&server_vir?func=exit">
The number of seconds to wait until the end session request is issued, is provided by the $8500 placeholder. The placeholder value is defined in the variable WWW_V_SESSION_TIMEOUT, as described above. By using this placeholder, the same timeout value is used and only needs to be updated in one location.
Other MetaLib timeout variables are unrelated to session (both set in the www_server.conf file):
A. Search_Server_Timeout - the threshold duration in seconds for the entire search process.
setenv SEARCH_SERVER_TIMEOUT 90
When this threshold is exceeded, a timeout occurs, the process stops, and an error message displays. The valid range of values is 30 - 180 (seconds). The default value is 90 seconds.
B. External_Timeout - applicable for all non-z39.50 resource configurations
setenv EXTERNAL_TIMEOUT 40
When the target resource does not respond, the search should terminate after a relatively short time, thus freeing the search servers for other tasks. The valid range of values is 15 - 90 (seconds). The default value is 40 seconds.
- Article last edited: 10/8/2013