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.

This is the server configuration:

  • 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?


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?


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?


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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