Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Process initiated from browser terminating half way

Status
Not open for further replies.

KPKIND

Technical User
Sep 8, 2003
130
IN
Dear All,

I have a script (scr1)that collects data from various systems in our environment every morning. This script A actually collects data and another Script (scr2) generates a web page for our level 1 team to see the status of the adapters. If the level 1 team wanted to know the latest status, I have given an option to click on a button, on clicking on a button it triggers a ksh script scr2 in cgi-bin directory which inturn calls scr1 which goes and collects the data and generates the webpage on need basis. The actual webpage generation code is in scr2, so after scr1 execution is completed, the control needs to come to scr2 to continue generating the webpage based on the latest collected data.

The scr1 & scr2 work fantastic when I execute from command line. But when I click on the button on the browser, I can see a process for scr2 and then a process for scr1 (with scr2's pid as parent pid) which collects the data, but suddenly the parent process (running scr2) seems to disappear and the child process still continues. The only thing I have observed is when scr1 (Child process) collects data from a server in line number 50 or around this line, the parent dies..

Do anyone of you have seen anything like this before.. please let me know how to go about..

Also I would want to possibly trace the parent process, can you recommend which is the easiest way to do this

TIA
 
Thanks Khalid for your suggestion.

But I have used this already and got the info below. It seems it is getting terminated with signal 15 which is a 15 /* software termination signal */. But I am not sure why it is getting terminated, which process is sending this signal.
----8<----8<----8<----8<----8<----8<----8<----8<----8<

kwaitpid(0xD0326A00, 0, 0, 0x00000000, 0x00000000) (sleeping...)
Received signal #15, SIGTERM [caught]
_sigaction(15, 0x00000000, 0x2FF202B0) = 0
_sigaction(15, 0x2FF202B0, 0x2FF202C0) = 0
sigprocmask(1, 0x2FF202C0, 0x2FF202C8) = 0
_getpid() = 150886
kill(150886, 15) = 0
Received signal #15, SIGTERM [default]
*** process killed ***

----8<----8<----8<----8<----8<----8<----8<----8<----8<

Any help would be much appreciated

TIA
 
Have you checked the ulimits of the user running this script? Maybe there is some restriction on that user's environment!

Regards,
Khalid
 
Khalid,

Probably that could be on of the reason.. but let me check..

the current values are

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 131072
stack(kbytes) 32768
memory(kbytes) 32768
coredump(blocks) 2048
nofiles(descriptors) 2000

 
Altough it is not advisable but try to make all of them unlimited and run the script. Note down the difference and if still fails then put the values back (so better to note down the values somewhere before changing them)

Regards,
Khalid
 
Unfortunately no luck inspite of changing everything to unlimited.

The parent process gets killed again at exactly the same line 50

Looks a bit of mystery, the filesystem has sufficient space, the system is not running out of memory or anything like that.

KPKIND
 
Is there any thing useful in errpt -a?

How about if you send the output of those scripts to a file as a type of logging?

Regards,
Khalid
 
There is nothing in the errpt.

The problem is with the script scr1 which calls scr2 to collect the data and based on the collected data scr1 generates a dynamic webpage to display on the browser.

Currently the scr2 is called, but scr1 doesn't wait until scr2 finishes its data collection and hence the webpage doesn't get created.

As mentioned earlier, if I execute scr1 on its own from command line, it calls scr2 and waits until that finishes and generates the webpage content as well.

Cheers
KPKIND
 
Khalid,

I have found out the problem.. Sorry it is nothing to do with AIX, but it is to do with the Web Server which had a timeout of 5 minutes.. I have changed it to 1200 secs and this has resolved the issue.

Anyway thanks for your help.

Cheers
KPKIND
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top