I cannot make my perl-script run stable on the server. Here is the problem.

When the script is accessed more than 5 times a second, the server freezes. And in some time later the server hangs forever. SSH does not respond and I have to reload the server.

I'm using Apache with mod_perl.

The script is hosted on Virtual Dedicated Server under Ubuntu. I'm operating it through SSH. These are the server params CPU: 400 MHz RAM: 256 MB

Maximal execution time of the script is 200 milliseconds.

I have monitored server load with "top" utility. It does not display any problems, this is the CPU statistics during load of 5 scripts per second.

Cpu(s): 12.1%us, 0.6%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 87.2%st

What options do I have to make the script work without problems?

link|improve this question

60% accept rate
feedback

4 Answers

I believe the problem is on line 58. Look around there.

But seriously, without any clue about the function or code, how do you expect an answer?

link|improve this answer
feedback

Depends entirely what the script does.

link|improve this answer
feedback

It sounds like the script is called again before it finished - maybe the second instance has no access to called resources or something like that. Hard to tell without some code... What is that perl script actually doing?

link|improve this answer
feedback
up vote 0 down vote accepted

Thanks guys, I have already found the answer. There was not enough memory to run it. Upgrading memory twice resolved the problem.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.