1. How to Workaround the PHP Time Limit Setting to Execute Long Tasks without Having to Change that PHP Setting
PHP provides a feature that is used to limit the time that a script can run.
This is useful for instance to prevent that bugs may cause excessive load on the server due to scripts that execute tasks that take too long to finish.
Sometimes it is better to split the tasks in multiple executions of the same PHP script to avoid that each execution exceeds the PHP execution time limit, which by default is 30 seconds.
This class can help determining when a script that runs a long task is close to exceed the PHP execution time limit.
This way, PHP applications can pause the execution of each task and redirect the Web page access that runs that long task, so the next request handled by the same PHP script can resume the execution of that long task where it was paused.
More ... Post a comment See comments (0) Trackbacks (0)
This is useful for instance to prevent that bugs may cause excessive load on the server due to scripts that execute tasks that take too long to finish.
Sometimes it is better to split the tasks in multiple executions of the same PHP script to avoid that each execution exceeds the PHP execution time limit, which by default is 30 seconds.
This class can help determining when a script that runs a long task is close to exceed the PHP execution time limit.
This way, PHP applications can pause the execution of each task and redirect the Web page access that runs that long task, so the next request handled by the same PHP script can resume the execution of that long task where it was paused.
More ... Post a comment See comments (0) Trackbacks (0)