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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -