Monday, October 7, 2013

EBS-- 11i forms sessions keep running-- Kill script

Unfortuneatly, EBS 11i has a problem with forms shadow processes.. These processes are appearing with the name f60webmx on our System, and keep memory an cpu busy for a long time..
These processes are created when a client login into forms server, which is normal.
Also, when a client finishes his/or her work, these processes should be closed/terminated, too.. So the problem arises here.. Because of the following causes, these processes hang and their code never exits properly. ..

Possible Reasons:
Users are not shutting down the Forms Applications at the end of the day. They dont logout , they dont do a graceful exit(Browser close for example)
The customer is not taking advantage of the forms60_timeout feature.
Based on the information provided ('Users not logging out at the end of the day.' and 'Business requirement to never have the popup timeout window appear' ), and the research performed (searching Oracle's internal DB as well as Google), it appears that the application is working as designed.

As a solution, you can Recommend/train the users to logout of the applications when they leave for lunch, long meetings, or for the day..
Also you can change business rules to allow for timeouts - set the heartbeat parameter to a value higher than the forms60_timeout parameter.
In addition you can write a cron job that looks for these close_wait processes and drop them - maybe run it at midnight.

This post is concantrated on the cron job as expected..

The following script can be run on midnights to find the f60web processes and kill those that are created more than 2 hours ago..

## Written By Erman Arslan 10/7/2013
## This script uses the stat file in the proc filesystem to display the status from the proc filesystem..
## the column #22 displays the start time of the process.
## So we subtract this value from the current time and gather the process lifetime.
## If this value is more than 100 minutes, we kill the relevant process..
init=`stat -t /proc/$1 | awk '{print $14}'`
curr=`date +%s`
seconds=`echo $curr-$init|bc`
name=`cat /proc/$1/cmdline`
let minutes=$seconds/60
if [ $minutes -gt "120" ]
kill -9 $1
pidlist=`ps ax | grep -i "f60webmx webfile"| grep -v grep | awk '{print $1}' | grep -v PID | xargs echo`
for pid in $pidlist; do
    findprocesstime $pid

In addition to that script; if you want to diagnose the process states, you can use the followin Oracle Support Note : 11i: Troubleshooting Tips For Spinning/Hanging F60WEBMX Processes [ID 457381.1]


  1. Thanks for this!! It looks so much simpler than some of the other solutions I've been looking at.


  2. thanks for your feedback, Richard.