How to run php script without all limits? -
i know there many questions, how run php script without time execution limit, im curious, how run php script without limitations. (i think there max memory consumption, mysql timeout, etc...)
i have script, mapping part of harddrive , reading directory , files content , storing data database. im expectating script take long time , huge chunk of memory.
so question is, should set "infinite" script running maximum posible duration?
as now, im using ini_set, reason script ends before finished. (and before 40 minutes time limit set)
ini_set('max_execution_time', 2400); ini_set('display_errors',1); ini_set('mysql.connect_timeout', 2400); ini_set('default_socket_timeout', 2400);
there's no way unset limit @ once.
the best can @ php.ini directive , try figure out applies system, , increase them unlimited value, or when not applicable, big value.
here's list of core php directives: https://secure.php.net/manual/en/ini.list.php
you have remember there's limit on system (ulimit on linux) can prevent php process grab enough memory / open enough files.
here's ulimit doc: http://ss64.com/bash/ulimit.html
don't forget vary user user.
also, run script php-cli (from command line) doesn't have limits enforced web server.
Comments
Post a Comment