Session time out

Change the session time out

1. Autoconfig variable s_oc4j_sesstimeout

2. Profile ICX:Session Timeout 

You can check $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml
where the value is maintained. The two values should be the same:  autoconfig variable s_sesstimeout / profile ICX:Session Timeout 

Profile Option : Session Timeout
set lines 400;
set pages 4000;

col profile_option_value format a25
col user_profile_option_name format a25
col Level format a14
select user_profile_option_name,
decode(level_id,10001,'Site',
10002,'Application',
10003,'Responsibility',
10004,'User',
10005,'Server',
10006,'Organization',
10007, 'ServResp',
level_id) "Level",
profile_option_value,
level_value
from
fnd_profile_option_values,
fnd_profile_options_vl
where
upper(user_profile_option_name) like upper('%ICX%%SESS%%TIME%')
AND
fnd_profile_option_values.profile_option_id =
fnd_profile_options_vl.profile_option_id;


User's Status in the ICX_SESSIONS Table
col timeout format a8
col user_name format a10
col mins_idle format 999.99
select
  disabled_flag,
  to_char(first_connect,'MM/DD/YYYY HH:MI:SS') Start_Time,
  to_char(sysdate,'HH:MI:SS') Current_Time,
  USER_NAME,
  session_id,
  (SYSDATE-last_connect)*24*60 Mins_Idle,
  fnd_profile.value_specific
    ('ICX_SESSION_TIMEOUT',
     a.user_id,
     a.responsibility_id,
     a.responsibility_application_id,
     a.org_id,
     NULL
    ) TimeOut
from
  ICX_SESSIONS a, fnd_User b
where
  a.user_id=b.user_id
  and last_connect > sysdate-1/24;

Rewritten to pick just one user
col timeout format a8
col user_name format a10
col mins_idle format 999.99
select
  disabled_flag,
  to_char(first_connect,'MM/DD/YYYY HH:MI:SS') Start_Time,
  to_char(sysdate,'HH:MI:SS') Current_Time,
  USER_NAME,
  session_id,
  (SYSDATE-last_connect)*24*60 Mins_Idle,
  fnd_profile.value_specific
   ('ICX_SESSION_TIMEOUT',
     a.user_id,
     a.responsibility_id,
     a.responsibility_application_id,
     a.org_id,
     NULL
   ) TimeOut
from
  ICX_SESSIONS a, fnd_User b
where
  a.user_id=b.user_id
  and user_name='&USER_NAME_IN_UPPER_CASE';

The session timeout query is meant to be run again and again to confirm that a user's activity is being counted and can also be used for determining what activity is counted against the idle timeout and what is not.
For example, when practicing with this you may note that when a user is within core forms the ICX_SESSIONS table is not updated with every single click.
Instead, the update is made only if at least one minute has passed since the last update.  The session begins when the user logs into applications using the supported "AppsLogin" method, but there is no session created (and therefore never a timeout window) when logging in directly via the unsupported "/dev60cgi/f60cgi" URL. 


Column Specifics
D - The disabled flag. If this is set to 'Y', then the session has been explicitly disabled, such as from a user logging out. If this is 'N', then the session is not disabled.
START_TIME - The time of day the user first logged in.
CURRENT - The current time of day; useful when running the query repeatedly as this timestamps each query run.
USER_NAME - The login name of the user.
SESSION_ID - The session ID of the user. This can be confirmed from forms using the following navigation from the "System Administrator" responsibility:
- Help/Diagnostics/Examine
- - Block:$PROFILES$
- - Field: ICX_SESSION_ID
- - Value: Click this field for the value to appear
(The value of my session_id=469704674 as seen in the above Detector1 query result)

MINS_IDLE - The perceived number of minutes that the user has been idle.
TIMEOUT - The value of "ICX:Session Timeout" for the specific user
The query, as written, will dump a listing of all users that have connected within the last hour. If different users have different values for "ICX: Session Timeout", then this will be immediately apparent. 



Profile Option Value of ICX:Session Timeout
select
SITE_ENABLED_FLAG,
APP_ENABLED_FLAG,
RESP_ENABLED_FLAG,
USER_ENABLED_FLAG,
ORG_ENABLED_FLAG,
SERVER_ENABLED_FLAG,
SERVERRESP_ENABLED_FLAG
from
fnd_profile_options
where
upper(profile_option_name) = 'ICX_SESSION_TIMEOUT';

Setting ICX_SESSION_TIMEOUT to correspond to Jserv Session Timeout
set_profile(178, 'ICX_SESSION_TIMEOUT',
10001,   0,
'%s_sesstimeout%'/(1000*60),
NULL);

Here is some additional information regarding timeouts within 11i Apps, specifically for the zone.properties and the profile option.
1.  Edit $APACHE_TOP/Apache/Jserv/etc/zone.properties and set the session.timeout in miliseconds) : 

session.timeout=600000
This is Apache Jserv Session timeout and should not be any higher than 30 minutes. Longer idle sessions will drain the JVM resources and can also cause out of memory errors.

2.  Login into Oracle Applications as SYSADMIN and search for profile ICX:Session Timeout; set this Profile Option to the same value as the one specified by session.timeout in zone.properties.
This is session timeout limit for Self Service Framework Applications and is specified in minutes. If the ICX session expires before the Jserv session, the user will be presented with a login page even though the Jserv session is still active. If the user logs back in before the Jserv session expires, they will see the old state of their middle-tier transaction. This can be confusing, since from the point of view of the user there is no distinction between the ICX session and the Jserv session

ICX: Limit time
ICX: Session timeout
The 2 profile options do the following:
"ICX: Limit time" = 8 >> This means that a session will last for 8 hours.
After that time the session will be closed "ICX:Session Timeout" = 180.
This means that after 3 hours of inactivity the session will be timed out.


TImeout Values
ICX: Session Timeout controls the time of inactivity of the session. If set to 30 minutes, then after no activity for 30 minutes you will get the popup window. This is for the Forms Session.
ICX:Limit Time controls the total time a session can be logged in. If set to 8 hours, then after 8 hours you will get the popup window regardless of what activity is being done This is for the Forms Session.
ICX:Limit connect is a profile option determines the max number of connection requests a user can make in a single session. If a user sends more requests than the value specified by this profile option in a single session, then the session will expire. This needs to be bumped up to 2000 +, because each time Session Time is checked it adds another ICX connection. This IS NOT DETERMEND BY THE NUMBER OF USER CONNECTIONS. The more ICX checks its self the more ICX connections you are going to see for a user.  
Session.timeout is set under the Apache's zone.properties This should be set to default which is 1800000. Anything higher can result in performance and out of memory errors. Typically session.timeout and ICX:Session Timeout are set to the same value.  
FORMS60_TIMEOUT = 5 Check .env for this. This is used to clean up and terminate the Forms Processes. The higher this variable is set, the longer the Forms processes will take to be cleaned up.  
Heartbeat = 2 check $OA_HTML/bin/appsweb.cfg and or appsweb_<sid>_<host>.cfg. This is used to send a packet to the Server to indicate it is still active.  
Best Practices
The following are the best practice setup
1. Profile Options:
ICX: Session Timeout = 30
ICX:Limit Time = 12
ICX:Limit connect = 2000

2. Apache zone.properties:
session.timeout = 1800000
Under Apache_Top:
$ grep -i session.timeout zone.properties

session.timeout=

Session.timeout is what controls the Self Service Timeout. If this times out, you will not be prompted to log back in and will receive a JSP/WEB type error message.


3. Modify the $FORMS60_WEB_CONFIG_FILE, which points to the appsweb_host_sid.cfg file:
networkRetries=30
heartbeat =2

Under OA_HTML/bin:
$ grep -i heartbeat appsweb.cfg

heartBeat=
networkRetries=

$ grep -i heartbeat appsweb_<SID>_auohs<host>.cfg

heartBeat=
networkRetries=

5. If using Forms servlets check the following:
Check formservlet.ini in Apache for FORMS60_TIMEOUT=5
To check if using servlets look for the line in jserv.conf file:
#ApJServGroup FormsGroup 1 1 /u02/oracle/visora/iAS/Apache/Jserv/etc/forms.properties
If using servlets this line will be uncommented.

Check also the appsweb.cfg under OA_HTML/bin for line:
; serverURL=/forms/formservlet

If using servlets this line will be uncommented.

$ grep -i forms60_timeout formservlet.ini
FORMS60_TIMEOUT=

6. FORMS60_TIMEOUT = 5 (check SID.env for this or echo$FORMS60_TIMEOUT)
Heartbeat = 2 (check $OA_HTML/bin/appsweb.cfg)

Note: There can be two different errors that affect the FROMS60_TIMEOUT and the heartbeat. If there are Intermittent FRM-92100 type errors it is due to the heartbeat being to high and timing out. So the heartbeat setting will need to be adjusted to suit your needs. If the FORMS60_TIMEOUT is set to a higher value you may see run away f60webmx processes. If there are run away f60webmx or f60webmx processes not terminating, then return the FORMS60_TIMEOUT to the default value of 5 and retest.
7. Bounce Forms Server.

8. Clear Apache cache $OA_HTML/_pages

9. Bounce Apache Server.


You have to pass the UNIX process id to this script.------Cut here---------

column "User Name" format a10  
column "ClPID" format a8    

select   d.user_name "User Name",          
b.sid SID,b.serial# "Serial#", 
c.spid "srvPID", a.SPID "ClPID",         
to_char(START_TIME,'DD-MON-YY HH:MM:SS') "STime"  
from fnd_logins a, v$session b, v$process c, 
fnd_user d  
where  b.paddr = c.addr  and a.pid=c.pid  
and a.spid = b.process  and d.user_id = a.user_id  
and (d.user_name = 'USER_NAME' OR 1=1)  
and a.SPID = &PID    
 


-----------------------------Script ends here--------------------------

OC4J session timeout, if not set, defaults to 20 minutes. This will cause the oc4j session to timeout
before the Apps/ Forms session timeout which is defined by profile option "ICX: Session Timeout"


1. Edit the <CONTEXT_NAME>.xml file in $INST_TOP/appl/admin directory

2. Ensure that value of profile option "ICX: Session Timeout" and autoconfig variable "s_oc4j_sesstimeout" in context file match.
In case you need the session to timeout after 2 hrs then the profile option "ICX: Session Timeout" and autoconfig variable "s_oc4j_sesstimeout" should be set to 120
3. Run autoconfig

Changed the s_oc4j_sesstimeout to 2700000 (45 * 60 * 1000)
Change the s_oc4j_sesstimeout changed from 2700000 to 45 minutes in the $CONTEXT_FILE
In R12 the session-timeout (s_oc4j_sesstimeout) is expressed in minutes in
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

In R11i the session.timeout is represented in mili-seconds

1. Change the s_oc4j_sesstimeout changed from 2700000 to 45 minutes in the $CONTEXT_FILE
2. Run Autoconfig

a) Set "ICX: Session Timeout" profile option value
b) Set "OC4J Session Timeout" in orion-web.xml
c) Set Timeout in httpd.conf.

3. Increase the JVM heap size to 512/1024 depending on the current value in the configuration file
for the oacore process

1. Increase heap size of both concurrent program and oacore process.

Please ensure that your heap size is at least -Xmx512m -Xms256m


To Increase Heap Size of concurrent program:
============================================

1. Navigate to the form System Administrator > Concurrent > Program > Define
2. In this form query the
Program : "Publish and Presentation Program" and
Short Name : "PUBLISH_PRESENT_WRAPPER"

3. In the resulting record check the Executable properties are
Name : "PUBLISH_PRESENT_WRAPPER"
Method : "Java Concurrent Program"

4. In the "Options" field of Executable properties enter the following
java options
-Xmx512m -Xms128m
and save the record.

This specifies the maximum and initial heap sizes:
-Xmx512M - Maximum heap size
-Xms128M - Initial heap size

5. Bounce the CM, DB Listener, and Apache Server


To Increase Heap Size of oacore process:
=======================================

1. Locate the file $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
2. In the file,
<process-type id="oacore" module-id="OC4J" status="enabled"
working-dir="$ORACLE_HOME/j2ee/home">
<module-data>
<category id="start-parameters">
<data id="java-options" value="-server -verbose:gc -Xmx1024M
-Xms256M -XX:MaxPermSize=160M

oacore java-options
-Xmx1024M - Specifies maximum heap memory.(1024 MB)
-Xms256M - Initial heap memory.(256 MB)
.
Please increase the values to resolve out of memory error.

3.  Bounce the Concurrent Manager, Database Listener, and Apache Server.

If the report still fails with the java heap space errors, change parameter Maximum heap size to -Xmx1024M or -Xmx2048m based on your hardware compatibility
FND:Debug Log
elect p.profile_option_name SHORT_NAME,
n.user_profile_option_name NAME,
decode(v.level_id,
10001, 'Site',
10002, 'Application',
10003, 'Responsibility',
10004, 'User',
10005, 'Server',
10007, 'SERVRESP',
'UnDef') LEVEL_SET,
decode(to_char(v.level_id),
'10001', '',
'10002', app.application_short_name,
'10003', rsp.responsibility_key,
'10005', svr.node_name,
'10006', org.name,
'10004', usr.user_name,
'10007', 'Serv/resp',
'UnDef') "CONTEXT",
v.profile_option_value VALUE
from fnd_profile_options p,
fnd_profile_option_values v,
fnd_profile_options_tl n,
fnd_user usr,
fnd_application app,
fnd_responsibility rsp,
fnd_nodes svr,
hr_operating_units org
where p.profile_option_id = v.profile_option_id (+)
and p.profile_option_name = n.profile_option_name
and upper(n.user_profile_option_name) like upper('%FND%DEBUG%')
and usr.user_id (+) = v.level_value
and rsp.application_id (+) = v.level_value_application_id
and rsp.responsibility_id (+) = v.level_value
and app.application_id (+) = v.level_value
and svr.node_id (+) = v.level_value
and org.organization_id (+) = v.level_value
order by short_name, level_set;

This document is a how to find the Oracle Applications username for a Forms
How To Identify The apps User Using The O/S PID For Forms Users In 11i
You have to pass the UNIX process id to this script.  
------------------------------------Cut here--------------------------  


column "User Name" format a10  
column "ClPID" format a8    
select   d.user_name "User Name",          
b.sid SID,b.serial# "Serial#", c.spid "srvPID", 
a.SPID "ClPID",         to_char(START_TIME,'DD-MON-YY HH:MM:SS') "STime"  
from   fnd_logins a, v$session b, v$process c, fnd_user d  
where  b.paddr = c.addr  and a.pid=c.pid  and a.spid = b.process  
and d.user_id = a.user_id  and (d.user_name = 'USER_NAME' OR 1=1)  
and a.SPID = &PID    

/ 
 
-----------------------------Script ends here-------------------------- 

ICX_FORMS_LAUNCHER -query
select substr(t.PROFILE_OPTION_ID,0,6) ID, HIERARCHY_TYPE,
substr(t.PROFILE_OPTION_NAME,0,20) User_Profile,
substr(v.PROFILE_OPTION_VALUE,0,60) Value
from fnd_profile_options t,
fnd_profile_option_values v
where t.profile_option_name = 'ICX_FORMS_LAUNCHER'
and t.profile_option_id = v.profile_option_id;

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf&#...