Hi guys,
I created a simple app wich import rows from a CSV and do a massive save, on localhost it’s works fine but on the server it’s too slow and trigger an internal server error, is there any way to resolve that.
Thanks.
Hi guys,
I created a simple app wich import rows from a CSV and do a massive save, on localhost it’s works fine but on the server it’s too slow and trigger an internal server error, is there any way to resolve that.
Thanks.
Increase the PHP timeout? Get a faster server? Break the import into pieces?
I will try a VPS, the import is only about five rows and even PHP timeout is unlimited is causes the same issue, thanks @Zuluru
5 rows doesn’t seem like the sort of thing that should take long to import. I’d add some error logging at key points in the code to see what’s going wrong. Maybe a loop is somehow becoming infinite instead of just running for each row?
Maybe you can generate a single SQL query from the multiple rows and just do a single execution.
Best way to import is to create a “import” model, save the uploaded file path. And in a shell/command import it, setup with a cronjob, (or using a queue system)
There are no timeouts in shell. You can even update the import entity with current % to show it via web