Hello:
(I posted related thread about a month ago. New information here.)
My ISP tells me that the Perl script I run on their server creates more than 30 processes simultaneously during peak Internet hours. How do I know? Because they shuts me down when the 30 process limit is hit. Ugh.
When I use SSH to view my process count (ps command), I can see 4 processes when idle, which jumps to 10 immediately after I refresh my home page. The home page is a Perl CGI script. The 10 processes stick around for 5 seconds or so, then it reverts back to the 4 idle processes. Here's the right portion of what the ps command produces:
==== when script is idle:
ps -ux
STARTED TIME COMMAND
11:55PM 0:00.17 sshd: coinqu@ttyp1 (sshd)
12:12AM 0:00.13 proftpd: coinqu - 24.110.45.14: IDLE (pr
11:55PM 0:00.06 -tcsh (tcsh)
12:36AM 0:00.00 ps -ux
==== for 5 seconds after I execute my script:
ps -ux
STARTED TIME COMMAND
Thu09PM 1:38.52 /usr/local/apache/bin/httpd
Thu10PM 1:55.65 /usr/local/apache/bin/httpd
11:55PM 0:00.17 sshd: coinqu@ttyp1 (sshd)
12:12AM 0:00.13 proftpd: coinqu - 24.110.45.14: IDLE (pr
12:29AM 0:00.05 /usr/local/apache/bin/httpd
12:29AM 0:00.10 /usr/local/apache/bin/httpd
12:36AM 0:00.00 /usr/local/apache/bin/httpd
Thu07PM 1:51.39 /usr/local/apache/bin/httpd
11:55PM 0:00.06 -tcsh (tcsh)
12:36AM 0:00.00 ps -ux
I'm no shell expert. Can you guys tell me if this behavior is normal or not? It appears that my single Perl script is creating 6 Apache/HHTP processes, and that these processes continue to run for about 5 seconds after they are done. Does this look normal? I am opening several DBM databases and locking one flat file during script execution with code that looks like this:
All code is plain vanilla (I'm a old C and Fortran guy, can't you tell?). I appreciate any help. Jeff and RonB were big helps last time. Thanks!
Paul Richards
Melbourne, FL
(I posted related thread about a month ago. New information here.)
My ISP tells me that the Perl script I run on their server creates more than 30 processes simultaneously during peak Internet hours. How do I know? Because they shuts me down when the 30 process limit is hit. Ugh.
When I use SSH to view my process count (ps command), I can see 4 processes when idle, which jumps to 10 immediately after I refresh my home page. The home page is a Perl CGI script. The 10 processes stick around for 5 seconds or so, then it reverts back to the 4 idle processes. Here's the right portion of what the ps command produces:
==== when script is idle:
ps -ux
STARTED TIME COMMAND
11:55PM 0:00.17 sshd: coinqu@ttyp1 (sshd)
12:12AM 0:00.13 proftpd: coinqu - 24.110.45.14: IDLE (pr
11:55PM 0:00.06 -tcsh (tcsh)
12:36AM 0:00.00 ps -ux
==== for 5 seconds after I execute my script:
ps -ux
STARTED TIME COMMAND
Thu09PM 1:38.52 /usr/local/apache/bin/httpd
Thu10PM 1:55.65 /usr/local/apache/bin/httpd
11:55PM 0:00.17 sshd: coinqu@ttyp1 (sshd)
12:12AM 0:00.13 proftpd: coinqu - 24.110.45.14: IDLE (pr
12:29AM 0:00.05 /usr/local/apache/bin/httpd
12:29AM 0:00.10 /usr/local/apache/bin/httpd
12:36AM 0:00.00 /usr/local/apache/bin/httpd
Thu07PM 1:51.39 /usr/local/apache/bin/httpd
11:55PM 0:00.06 -tcsh (tcsh)
12:36AM 0:00.00 ps -ux
I'm no shell expert. Can you guys tell me if this behavior is normal or not? It appears that my single Perl script is creating 6 Apache/HHTP processes, and that these processes continue to run for about 5 seconds after they are done. Does this look normal? I am opening several DBM databases and locking one flat file during script execution with code that looks like this:
Code:
$db_msg_dbase = $loc_path_data_rw.'/db_msg_record_by_id'; $db_msg_go = dbmopen(%db_msg_record_by_id,$db_msg_dbase,0666);
Code:
$db_msg_lock = $loc_path_data_rw.'/db_msg_lock.txt'; open(MSG,">$db_msg_lock"); flock(MSG,2);
Paul Richards
Melbourne, FL
Comment