limit CPU usage for script(s)

Hello

Recently I received this message from my host:

One of your domains, xxxxxxx.xxx, has been suspended for excessive system resource usage. The traffic and scripts on this domain were causing system loads in excess of 20 with over 120 processes running for it. We cannot allow this to continue.
This is a php-mysql based site and I am now re-engineering it to find any weak points that might cause the trouble, except the high traffic which I can't prevent.

Except this, I was also wondering if it is possible to limit the maximum CPU usage by a script in some way, or even prevent from running if the server load is high. Is it possible? Any ideas are welcome.

Also, the number '120 processes' represents what? Is it caused by PHP or MySQL? I thought PHP would not create many processes as an apache module.

Thanks.

 

 

 

 

Top