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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing Perl scripts.

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I reported slow server load times to my ISP.
They tell me that several scripts have been running for a few days.
The script runs through with no infinite loops, can someone please suggest what on the server isn't cleaning up after itself?

Keith
 
Depends on what the scripts do and how they are checking what the running time of the scripts are, some may be showing cumulative run time rather than a single instance.

Is this a VPS or a shared environment?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Thanks Chris.
It is a shared environment.
The script is very simple read of a database and output to HTML, it should only be active for a few seconds.
I have never had a need to kill a script before.

Keith
 
read the script carefully. Is there any way that an error condition can cause a loop in the logic?

Bill
Lead Application Developer
New York State, USA
 
The script is very simple read of a database and output to HTML,

It is possibly a cumulative time they are looking at rather than the script continuing to run, Perl scripts, like Python and PHP (other scripting languages are available) end when the last instruction is processed.

Assuming this is a process that runs on a HTTP server and executes on a URI request, it will always run as the account/site 'owner' so for the rather simplistic process monitoring will appear to be the same process instance continuing to run rather than every new instance of the script running and ending.

I see this same thing on our 'shared' servers with spamd/spamassassin processes running as the account user name. if the server hasn't been restarted for any reason, these processes might seem to have been running for several days, but they only 'wake up' when an email message is processed, which only takes a few milliseconds but many thousands of individual message scans clocks up several hours worth over a couple of months.

So I would suspect that your hosting provider 'technical' support are not too clued up on process monitoring and are treating 'top' time stats as continuous 'running' time rather than it being a cumulative time since the last server restart.

And as it is a 'shared' environment ... it's probably NOT even your site or scripts that are causing the slow load times.



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Thanks Chris
I missed your reply.
You are right about them being clueless sometimes but every time I find a decent ISP, they sell out to a big company and all goes down the tubes.
There response to my slow server was met by them saying they would speed it up.
My question of why it was not operating at full speed to start with was met with a shrug.

I am tired of migrating websites, the experts make it sound so easy and I am sure it is with simple sites which don't use any scripting or anything else useful.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top