-2

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?

Froggiz
  • 3,043
  • 1
  • 19
  • 30
par
  • 1,263
  • 3
  • 12
  • 15

3 Answers3

2

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?

Randal Schwartz
  • 395
  • 1
  • 9
0

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?

PEra
  • 2,875
  • 18
  • 14
0

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

par
  • 1,263
  • 3
  • 12
  • 15