This error happens when the execution time of the PHP script exceeds the time limit for program execution in Php.ini file.
By default the timer is set to 30 seconds in php.ini and you can track the time limit by tracing for ‘max_execution_time’ directive in php.ini.
A quick way to find the execution time set for PHP is to check the phpinfo() function.
Solution:
You can set the time limit by issuing “set_time_limit(60);” statement to increase the time limit.
A better way would be trace where the bottlenecks are in the program to identify what causes the time lag. Possible causes may be
* Poorly structured queries
* Never ending iterations
* Read lock on files when they are opened by multiple sources etc.