Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Process Runs Wild, Eats resources

Quote Reply
Process Runs Wild, Eats resources
Hi:



This is NOT a problem with Links per se, but involved with it. I have made a few mods... and something is not right somewhere. I am SURE the problem is with something I wrote.... but I cannot track it down, and I was hoping someone might know how I could.



Every now and again (1-3 times an hour, it seems), something goes into a loop, gobbles up memory and CPU. Because it happens so unoften, I know it is not one of the major processes (jump, page, etc), and I guess it is something that only get's called very occasionally. Possibly bad code in a global (although I proffed all those last night, found nothing...) or one bad Link... I view top, and all I can tell is the PID (which does not help) and it is a httpd process. If I knew exactly the page called (with paramaters), I could find the problem easily. Is there some way I can find out the script or the page being viewed that starts this runaway process?



Currently, I have the RMemLOAD (?- something like that) set to 40 megs, so it keeps them from running wild... but the process is still in limbo, so I restart httpd every hour to kill them. But I would really like to find the bad code and fix it.



Any ideas?



thanks!



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Process Runs Wild, Eats resources In reply to
You mean you don't see the script name in the COMMAND column in TOP? That's odd.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Process Runs Wild, Eats resources In reply to
Stealth:



No, I do not! When I run TOP, I see (in Command):



getty

bash

syslogd

sendmail

cron

httpd



stuff like that.



Is there a way to make top show the script? How?



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Process Runs Wild, Eats resources In reply to
Here is top for me:



Quote:


12909 nobody 2 0 21216K 18820K accept 0:00 1.93% 1.76% httpd
12832 nobody 2 0 21524K 19120K sbwait 0:01 0.44% 0.44% httpd
108 root 2 0 7844K 5500K select 2:37 0.00% 0.00% perl
85 root 2 0 2436K 584K select 0:15 0.00% 0.00% sshd
71 root 2 0 936K 340K select 0:07 0.00% 0.00% syslogd
80 root 10 0 988K 432K nanslp 0:06 0.00% 0.00% cron
14289 root 2 0 1764K 1080K select 0:03 0.00% 0.00% sendmail
87 root 2 0 908K 96K select 0:03 0.00% 0.00% usbd
12255 nobody 2 0 22464K 20060K accept 0:02 0.00% 0.00% httpd
12256 nobody 2 0 22520K 20108K sbwait 0:02 0.00% 0.00% httpd
12270 nobody 2 0 22024K 19628K accept 0:02 0.00% 0.00% httpd
12264 nobody 2 0 22280K 19868K accept 0:02 0.00% 0.00% httpd
12258 nobody 2 0 21900K 19576K accept 0:02 0.00% 0.00% httpd
12271 nobody 2 0 22128K 19716K accept 0:02 0.00% 0.00% httpd
12272 nobody 2 0 21524K 19120K accept 0:02 0.00% 0.00% httpd
12254 root 2 0 19844K 17440K select 0:02 0.00% 0.00% httpd
12257 nobody 2 0 22008K 19600K accept 0:02 0.00% 0.00% httpd
12389 admin 28 0 1920K 972K RUN 0:02 0.00% 0.00% top
12259 nobody 2 0 21820K 19420K sbwait 0:02 0.00% 0.00% httpd
12304 nobody 2 0 22064K 19664K accept 0:02 0.00% 0.00% httpd
12268 nobody 2 0 21608K 19208K accept 0:01 0.00% 0.00% httpd
12830 nobody 2 0 21412K 19020K accept 0:01 0.00% 0.00% httpd
12275 nobody 2 0 21296K 18876K accept 0:01 0.00% 0.00% httpd
12823 nobody 2 0 21480K 19088K sbwait 0:01 0.00% 0.00% httpd
12827 nobody 2 0 21300K 18896K sbwait 0:01 0.00% 0.00% httpd
12387 root 2 0 2468K 1520K select 0:00 0.00% 0.00% sshd
78 root 2 0 1052K 176K select 0:00 0.00% 0.00% inetd
12826 nobody 2 0 19924K 17532K sbwait 0:00 0.00% 0.00% httpd
12869 nobody 2 0 19924K 17532K sbwait 0:00 0.00% 0.00% httpd
12388 admin 10 0 1040K 692K wait 0:00 0.00% 0.00% bash
12915 nobody 2 0 19888K 17508K sbwait 0:00 0.00% 0.00% httpd
12910 nobody 2 0 19888K 17508K accept 0:00 0.00% 0.00% httpd
121 root 3 0 944K 0K ttyin 0:00 0.00% 0.00% <getty>
125 root 3 0 944K 0K ttyin 0:00 0.00% 0.00% <getty>
124 root 3 0 944K 0K ttyin 0:00 0.00% 0.00% <getty>
128 root 3 0 944K 0K ttyin 0:00 0.00% 0.00% <getty>
127 root 3 0 944K 0K ttyin 0:00 0.00% 0.00% <getty>
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Process Runs Wild, Eats resources In reply to
"top" shows the highest usage processes. To see the script use ps aux
Quote Reply
Re: [Paul] Process Runs Wild, Eats resources In reply to
Paul:



As always, thanks for the help. Sorry I am such a newbie!



I ran ps aux, and yes it has more info, but COMMAND returns "/usr/local/apache/bin/httpd" rather than the full path to the script running. Is there a switch or something I should run with pas aux to get that?



(I did read the man page... I just did not really understand it!)



Thanks!



Dave
dave

Big Cartoon DataBase
Big Comic Book DataBase