0

I want to import an Excel (CSV, XLX, XLSX) file to my phpmyadmin databases. The file is 50 MB having around 5 million records. The issue is that whenever I try to upload that file, around 900 000 records are successfully inserted, but after that server shows an error of Exceeding Time Limit.

I also tried it by increasing max-execution-time of PHP.ini file but still, it shows the same error message. My Server is Hostgator.

James Z
  • 12,209
  • 10
  • 24
  • 44
  • How did you try to increase the timeout limit? Did you try to create a php file with phpinfo(); function inside and verify that the timeout limit has been altered? If you cannot.. a crappy way is to take a watch and count the seconds it takes to give you the timeout error.. just to verify that the limit you set, it was actually placed. I mostly believe that hostgator would not allow the user to override any php.ini settings. I know this is not your question but.. Would it work for you to break the file into smaller parts? – user2399432 Apr 17 '18 at 14:29
  • Thank you so much for your kind reply. But Hostgator is allowing to change the php.ini file. And yes max_execution_time can be altered. Because before changing I was just able to insert 1 lac to 3 lac data but now I am able to insert 9 lac 52K records. And yes I think I must have to upload it in Chunks. Anyhow thanks again mate. – Arslan Ahmad Apr 18 '18 at 18:38
  • Just an extra suggestion since I am not aware of your code or server configurations: there are a few settings that might be related to what you are doing.. max_input_time, max_execution_time, set_time_limit, upload_max_filesize, post_max_size Good luck and let me know the results! – user2399432 Apr 20 '18 at 12:16

0 Answers0