Sunday, October 20, 2013

How Stop CPU Limit Exceeded on your Websites

We've Received alot of Complaints on this. Normally, in Youhosting, when your Website's CPU is above 70%, this Error Shows up!
Here's a to Control it.. Just addthis Code to the Header Path of your Script..


<?php
$load 
sys_getloadavg();$limit 50;
if(
$load[0] >= $limit){header('HTTP/1.1 503 Pls, Try again Later!');
die(
'< center>< h2>Our Server is Quite Busy, Check back Later.. < br> Â© MasterLoft.TK');
}
?>



With the Code Above, you Site is not Allowed to Overload which causes the Cpu limit to Exceed..

Incase you use PBNL Script, just Upload and Unzip this header.php to your /moduls Folder.

No comments:

Post a Comment