I will be putting everything in bullets to not make the question lengthy..
- I have 800,000++ rows of CSV
- Uploads it thru cakephp 3
$this->Form->upload()WORKING - Save the file in webroot for now WORKING
- Open the file using
box/spoutWORKING - Loop thru each row and save each row to the database PARTIALLY WORKING
So everything seems to be working fine except after about 5 mins and ~200,000 records saved in the database it returns an error 503 service unavailable. I am able to save 800,000 rows on my localhost, but this error appears on the live site which is hosted on GoDaddy.
Are there any settings I can change to prevent this error from happening? Maybe increase a timeout for this specific error? (I have set_time_limit(0) and ini_set('memory_limit','-1') just to make it work. I have even set max_execution_time to a bigger number in the servers php.ini.
Not really sure what solution I can do to fix this. Any suggestion would be appreciated thanks!