Forms Abnormal Termination - FORMS_CATCHTERM, FORMS_RECORD_GROUP_MAX & FORMS_MMAP






When we are facing performance issues with frmweb sessions, below CONTEXT_FILE variables must be considered –

FORMS_CATCHTERM –

This variable decides enabling/disabling of forms abnormal termination handler(FATH).
FATH basically writes diagnostic information into dumpfile or form server log. Default value is '1'.

FORMS_RECORD_GROUP_MAX –

This is a customized environment variable when using in servlet mode while we can directly set this in socket.env with socket mode.

FORMS_MMAP –

This is mainly monitored in socket mode. When set to 0 will not put .fmx files in shared memory mapped files resulting in more memory consumption. Recommended value for this variable is 1.

Scenario -

Common frmweb process issues are with high CPU and memory consumption. This results in slowing down application server where forms services are running. Whenever an end user is working LOVs fetching huge number of records, these records are loaded in memory and result in paging. CPU consumption then increases paging process in and out of memory.
Core dumpfiles or form server logs are located under -
$FORMS_TRACE_DIR

Note that these settings are same in r12.1 and r12.2 as forms version did not change.
We will not be discussing about setting these values as it is already mentioned in 745711.1. We will understand implications post setting these values –

Case – 1 (Default)

FORMS_CATCHTERM=1
This implies Forms abnormal Termination handler is enabled and as part of post implementation, we as APPS DBAs must consider setting it to 0 as recommended in 745711.1.

Case – 2 (Socket Mode)

Reference - 1382442.1
socket.env under INST_TOP is updated in socket mode and below are 3 variables that should be modified.
FORMS_CATCHTERM
FORMS_MMAP
FORMS_RECORD_GROUP_MAX

Case – 3 (Servlet Mode)

Reference - 745711.1
"s_forms_catchterm" is name for FORMS_CATCHTERM in CONTEXT_FILE.
While FORMS_RECORD_GROUP_MAX does not have any autoconfig predefined name. We require additional customization for the same.
FORMS_CATCHTERM
FORMS_RECORD_GROUP_MAX

  

Implications of Setting FORMS_RECORD_GROUP_MAX


This variable can impact forms of different module to limit number of records to be fetched. Below is summarized list of doc ids and recommendations given by Oracle. It is advisable to set this variable optimally according to your environment.
You can set it to 10000, 20000 or 30000 as per Oracle. There are some rare occasions when even 30000 will not suffice. In such rare occasions you can always raise a ticket with Oracle Support.

Oracle Support internally should request development team to modify standard form and release it as a patch for your environment.

Unable To Add Item In ASCP Planning Workbench When Item List > FORMS_RECORD_GROUP_MAX Environment Variable (Doc ID 2294933.1)
-          Download, review and apply patch 26407840

In Sales Order form Query by Held By Field, LOV does not show all options (Doc ID 2478176.1)
-          Download, review and apply patch 28521267

EBS: Searching LOV has shown error Choices in list, limited by maximum rows: 30000 (Doc ID 2190037.1)
-          FORMS_RECORD_GROUP_MAX=50000

'Menus' LOV from 'Responsibilities' form (FNDSCRSP.fmb) using a filter shows no result or shows part of the existing menus (Doc ID 2390886.1)
-          Download, review and apply patch 27362828

When Query Manufacturers Part Numbers Via Form INVIDMPN Error Message "Choices in the list, limited by maximum rows: 30000" (Doc ID 1272217.1)
-          Download, review and apply patch 12983688

CSXSRISR.FMB NEEDS FILTER BEFORE DISPLAY = YES ON LOV'S (Doc ID 2322101.1)
-          Download, review and apply patch 26522836

Lov Constraint On Project Field In 'Release Sales Order For Picking' Form (Doc ID 1094523.1)
-          Download, review and apply patch 9434838

Cannot Add Functions To Menus : Some Functions Are Not Available In The List Of Values (Doc ID 1961346.1)
-          Increase value of variable FORMS_RECORD_GROUP_MAX to 30000

Task Assignee LOV Is Restricted To Show Limited Number of Records (Doc ID 1142284.1)
-          Increase value of variable FORMS_RECORD_GROUP_MAX to 30000 

Forms Abnormal Termination - RTI Files


WHAT ARE .RTI FILES?


For the starters, we referred - What Are .RTI And .FLI Files? (Doc ID 470850.1) and summarized as follows -
Format-    em_<PID>.rti
These files are generated by the forms runtime processes.
Used by Oracle Application Manager "OAM" and the Enterprise Manager "EM" for Forms Monitoring services

The rti files should automatically be cleaned up/removed when the user logs out of the Oracle Applications in a normal logout fashion.
However, if a user does not logout, and just uses the 'X' button to close the form or kills the browser session before logging out of forms, then the rti file may not get cleared.
If the files are not automatically being removed, then you can write a Unix shell script to remove them periodically.

We opened a forms session from ebs r12.1.3 to simulate -
1. Normal Logout Fashion for forms
2. Forms Abnormal termination

We used below environment for our test-case -

Normal Logout Fashion for forms



Suppose client IP is 195.1.1.171
OS level "ps" command can easily help us get process id of frmweb session as follows -

[applprod@prod forms]$ ps -ef | grep frmweb | grep 195.1.1.171
applprod 21246 22589  0 14:25 ?        00:00:00 /data/prod/apps12/apps/tech_st/10.1.2/bin/frmweb server webfile=HTTP-0,0,1,default,195.1.1.171

SQL Prompt –
SQL> select v.MACHINE,v.PROGRAM, v.MODULE, v.ACTION, v.CLIENT_IDENTIFIER
from v$session v
where v.process = '21246';


We then checked $FORMS_TRACE_DIR -
[applprod@prod forms]$ ls -ltr | tail
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:20 em_20068.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:21 em_20240.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:22 em_20479.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:23 em_20782.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:25 em_21246.rti
-rw-r--r-- 1 applprod proddba  132 Jul  7 14:25 em_21357.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:31 em_23143.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:33 em_24700.rti
-rw-r--r-- 1 applprod proddba 1701 Jul  7 14:40 Servlet_RTI.log_22589
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:40 em_27036.rti


There were 2 files updated -

[applprod@prod forms]$ tail Servlet_RTI.log_22589
20068 frmweb server webfile=HTTP-0,0,1,default,195.1.1.137
20240 frmweb server webfile=HTTP-0,0,1,default,195.1.1.150
20479 frmweb server webfile=HTTP-0,0,1,default,195.1.9.136
20782 frmweb server webfile=HTTP-0,0,1,default,195.1.1.177
21246 frmweb server webfile=HTTP-0,0,1,default,195.1.1.171
21357 frmweb server webfile=HTTP-0,0,1,default,195.1.2.90
23143 frmweb server webfile=HTTP-0,0,1,default,195.1.1.159
27036 frmweb server webfile=HTTP-0,0,1,default,195.1.1.225
27984 frmweb server webfile=HTTP-0,0,1,default,195.1.5.160
28143 frmweb server webfile=HTTP-0,0,1,default,195.1.2.142
[applprod@prod forms]$ cat em_21246.rti
listener = 1
config = default
pid = 21246
connect = Sun Jul  7 14:25:06 2019 +04
ip = 195.1.1.171
user = APPLSYSPUB
db_string = PROD
[applprod@prod forms]$
[applprod@prod forms]$



From front-end, we went for a normal exit of Oracle Forms.
Closed form window as follows –




Normal termination automatically cleared file em_21608.rti from backend.
[applprod@prod forms]$ ls -ltr em_21246.rti
ls: em_21246.rti: No such file or directory
[applprod@prod forms]$


Even entry in file Servlet_RTI.log_22589 was cleared
[applprod@prod forms]$ cat Servlet_RTI.log_22589 | grep 21246
[applprod@prod forms]$



Forms Abnormal Termination -

Later we opened a new form session for abnormal termination.
We abnormally terminated this form by closing browser directly and cleared web browser cache,
reopened web browser and started form session again

[applprod@prod forms]$ ls -ltr em_21246.rti
ls: em_21246.rti: No such file or directory
[applprod@prod forms]$ ls -ltr | tail
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:20 em_20068.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:22 em_20479.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:23 em_20782.rti
-rw-r--r-- 1 applprod proddba  132 Jul  7 14:25 em_21357.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:31 em_23143.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:40 em_27036.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:42 em_27984.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:43 em_28143.rti
-rw-r--r-- 1 applprod proddba 1642 Jul  7 14:49 Servlet_RTI.log_22589
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:49 em_30121.rti
[applprod@prod forms]$
[applprod@prod forms]$
[applprod@prod forms]$ cat em_30121.rti
listener = 1
config = default
pid = 30121
connect = Sun Jul  7 14:49:00 2019 +04
ip = 195.1.1.171
user = APPLSYSPUB
db_string = PROD
[applprod@prod forms]$

[applprod@prod forms]$ tail Servlet_RTI.log_22589
20068 frmweb server webfile=HTTP-0,0,1,default,195.1.1.137
20479 frmweb server webfile=HTTP-0,0,1,default,195.1.9.136
20782 frmweb server webfile=HTTP-0,0,1,default,195.1.1.177
21357 frmweb server webfile=HTTP-0,0,1,default,195.1.2.90
23143 frmweb server webfile=HTTP-0,0,1,default,195.1.1.159
27036 frmweb server webfile=HTTP-0,0,1,default,195.1.1.225
27984 frmweb server webfile=HTTP-0,0,1,default,195.1.5.160
28143 frmweb server webfile=HTTP-0,0,1,default,195.1.2.142
30121 frmweb server webfile=HTTP-0,0,1,default,195.1.1.171
30236 frmweb server webfile=HTTP-0,0,1,default,195.1.1.214
[applprod@prod forms]$



We closed browser directly without closing form session to make sure there was abnormal termination for forms.
[applprod@prod forms]$ ls -ltr | tail
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:22 em_20479.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:23 em_20782.rti
-rw-r--r-- 1 applprod proddba  132 Jul  7 14:25 em_21357.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:31 em_23143.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:40 em_27036.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:42 em_27984.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:43 em_28143.rti
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:49 em_30121.rti
-rw-r--r-- 1 applprod proddba 1701 Jul  7 14:49 Servlet_RTI.log_22589
-rw-r--r-- 1 applprod proddba  133 Jul  7 14:49 em_30236.rti
[applprod@prod forms]$ cat em_30121.rti
listener = 1
config = default
pid = 30121
connect = Sun Jul  7 14:49:00 2019 +04
ip = 195.1.1.171
user = APPLSYSPUB
db_string = PROD
[applprod@prod forms]$


Concluding our use-case, em_30121.rti will reside on server forever unless cleared manually as part of house-keeping. 

We can set a cron job to perform this, a shell script with below code will clear .rti files older than 15 days -


cd $FORMS_TRACE_DIR

find . -name "em_*.rti" -mtime +15 |wc -l >> /data/prod/apps12/apps/scripts/file_count.lst;
echo "\n number of forms  logfiles older than 15 days - `cat /data/prod/apps12/apps/scripts/file_count.lst | tail -1`"


find . -name "em_*.rti" -mtime +15 -exec rm -f {} \;