473,378 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

30 Simultaneous Processes

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:

Expand|Select|Wrap|Line Numbers
  1. $db_msg_dbase = $loc_path_data_rw.'/db_msg_record_by_id';
  2. $db_msg_go = dbmopen(%db_msg_record_by_id,$db_msg_dbase,0666);
Expand|Select|Wrap|Line Numbers
  1. $db_msg_lock = $loc_path_data_rw.'/db_msg_lock.txt';
  2. open(MSG,">$db_msg_lock");
  3. flock(MSG,2);
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
Oct 8 '09 #1
2 2408
numberwhun
3,509 Expert Mod 2GB
Can you do me a favor? Post a link to your other thread and also show us your script? I definitely want to see what your code it doing. Thanks!

Jeff
Oct 8 '09 #2
Thanks, Jeff. You guys are right on top of things. The original post is at:

http://bytes.com/topic/perl/answers/...-process-limit

and I've put the offending Perl script at this web link:

http://statmatics.com/for_bytes/

This script runs a web site called CoinQuest, which I use to do rare coin appraisals. You can view CoinQuest here:

http://coinquest.com

-- Paul R.
Oct 8 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Eric S. Johansson | last post by:
I have an application where I need a very simple database, effectively a very large dictionary. The very large dictionary must be accessed from multiple processes simultaneously. I need to be...
1
by: slugger | last post by:
Hope this is not OT: I am running into some strange things whenever my ASP pages send out simultaneous requests to another ASP page which in turn gains access to a MySQL database using a DSNless...
6
by: Jimnbigd | last post by:
I want to write a game, and sounds will really add to it. Note that I would always make the sounds optional. I hate it when I go to a URL and unexpectedly get sounds or music. I have played...
12
by: Dan V. | last post by:
Since an ASP.NET/ADO.NET website is run on the server by a single "asp_net worker process", therefore doesn't that mean that even 50 simultaneous human users of the website would appear to the...
2
by: alltest1 | last post by:
Hi, I am wondering if it is thread-safe to use both JDBC and libpq simultaneously. On a Linux, JDBC is used by Tomcat and libpq is used by a client software written in C language. So JDBC and...
2
by: Frank | last post by:
Hello all, I have to access a flat file (.txt or something) by two applications at the same time. For reading and writing. Is that possible and how? Thanks Frank
9
by: andy.z | last post by:
If 2 people try to access the same text file at the same time to write to it - what happens in PHP ? What I mean is - presumably the first will be ok - But what will the second person actually...
8
by: dmoore | last post by:
Hi folks, I've seen the following issue come up in multiple posts to this mailing list: I have a python program that spawns a child process with popen or popen2 or popen3 or popen2.popen2...
4
by: raylopez99 | last post by:
Compound question: first, and this is not easy, if there's a way to detect multiple simultaneous key presses in C# let me know (in the below code, keys c and d being pressed simultaneously or...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.