I have a Symfony2 command line app that I've built. It fetches a ton of data from a web service to pre-cache. I'm running into a problem where after about 5 minutes the app is "Killed".
I run the command:
php app/console FTW:loadAuctionHouse
My application outputs its steps while running, and just outputs "Killed" all of a sudden after a few minutes.
So... question: Is there a built in time limit to the command line apps? Or is there something "funky" going on? Can someone explain why this could happen?
As every php application (cli as well as apache or anything else) there is a execution time limit. Add
set_time_limit(0);
to your command line tool to prevent this. CAUTION: This will result in a script that runs till infinity if caught in an endless loop or some recursion loop. While this solution is better than increasing the script execution time in your php.ini, it should be done only when really neccessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With