How or when do I know my Web Application can't handle the traffic/activities and show a "Fail Whale" kind of page?
You could try sys_getloadavg() if you just want to show an error when the server is under high load.
<?php
$load = sys_getloadavg();
$max_load = 95;
if($load[0] >= $max_load){
// Show failwhale
}else{
// Do stuff
}
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With