I have hook_cron which imports excel file and saves nodes. When I run cron with file which have only 100 items it is ok, but when I upload file with size of 13 mb with thousands of rows it gives 502 gateway. And it doesnt add even one node.
I know this can be duplicated question, but I didnt find right solution for my case. I have tried take out limitations:
ini_set('memory_limit', '-1');
ini_set('max_execution_time', 3600);
ini_set('max_input_time', 3600);
Sorry for my english and not knowing terms, but I really need help, I hope you will offer appropriate solution. If something is misunderstandable or you have any questions, please ask
Thank you in advance.