command line interface - Limiting PHP execution time under CLI -
i run large number of php scripts via cli executed cron in following format :
/usr/bin/php /var/www/html/a15432/run.php /usr/bin/php /var/www/html/a29821/run.php
in instances there problem once of files whereby execution of file enters loop or not terminate due error in particular script.
what achieve if either of above occurs, php cli stops executing script.
i have searched , indications need use command, have entered @ beginning of each file, not seem making difference.
ini_set('max_execution_time', 30);
is there other way can better protect server 1 (or more) of these rogue files cannot allowed bring down server entering kind of infinite loop , using of servers resources trying process file? make problem worse, these files can triggered every 5 minutes means @ times, there loads of same files trying process.
of course realise correct solution fix files there better error handling , never allowed enter state, @ moment i'd understand why doesn't work expected.
thank you.
Comments
Post a Comment