Hello Trent, On Tue, 2004-02-24 at 07:27, Stephens, Trent A wrote: > Hello, > > We have a UNIX server here that is running CGI Perl scripts with > Apache web server and noticed that there are many 'defunct' processes > associated to userid running the webserver. There are some system > calls made by some of the perl scripts that I am wondering may be the > culprit. Can anyone shed some light on this issue?? Here is an > example of a system call being made in one of the Perl scripts: > > if (System("cp $ajtfileR $ajtfileR2")) > { > if ($LMAERO_Config::TempFileDebug == 0){ cleanup();} > Error("",2,"\"$!\" error copying $ajtfileR"); > }
I don't think just a system call would be the culprit. If the system call is not returning, or if something is leaking memory, then that might certainly be the culprit. I'm not sure if you maintain the code in question, but shelling out to do something like a copy is really expensive and inefficient. You could replace it with just perl code to just read in the file and output the contents to the destination file. This should help performance because the system does not have to fork, set up the shell, execute the 'cp' program, and then return. > Thanks in advanced! > > Trent Stephens -- Justin Hopper <[EMAIL PROTECTED]> UNIX Systems Engineer BSDHosting.net Hosting Division of Digital Oasys Inc. http://www.bsdhosting.net _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs