Good day,
I am running a PHP script that parses csv files and inserts data into the table,
basically it handles about 2gb of files per day. I do have it scheduled every 5 min and handle only one file per request.
My question is how can I run it only once and make it run for a day or till the files are done.
I had it before but it was crushing from time to time. I guess my question would be, how can I free memory, any kind of memory_flush method?
I use usleep and sleep in order to to crush it but still...
Thank you.
PHP Script that last for a long time
Moderator: General Moderators
Re: PHP Script that last for a long time
You need to get rid of max_execution_time and also make sure you're not getting killed due to memory usage,. I'd recommend proxying your command thru nohup to the PHP CLI for maximum longevity