Script timed out before returning headers

Some times , it happens that your domain start  throwing 500 Internal Server Error all of a sudden and when you check  the apache error logs for that domain  you will get  the below errors in  the error logs    :::  Script timed out before returning headers 

 

And looking at the error, it seems the problem is with  the PHP  “max_execution_time”  variable setting and you have tried increasing  the max_execution_time value to a relatively higher value but it’s still showing the 500 Internal Server Error and now started to wonder how do I get rid of this problem then don’t panic because this can simply be resolved by following the below simple fix :

 

Login  to WHM >> Main >> Service Configuration >> Apache Configuration >> Global Configuration

and then set the “Timeout ” variable value to a litter higher value.

 

That’s all you are done.