Major Bob Posted June 16, 2016 Share Posted June 16, 2016 (edited) Hi, I'm trying to import my combinations via CSV import but I continually get a 504 time out error. I've already imported my products and categories successfully. There are up to 3000 combinations but I've reduced this to smaller files with only 500 to try and complete the process. Every attempt I make times out at 300 seconds. This is what I've tried so far: I've changed the php.ini file, altering the time out value to 5400 seconds but it still times out after 300. I've also looked into the config.php file and the files in the config folder to make sure nothing is overriding the php.ini file but it's not. My host has increased the memory to 512 and made sure my PHP version isn't outdated. Can anybody provide any insight as to what may be causing the process to time out at 300 seconds? Edited December 5, 2016 by Major Bob (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted June 16, 2016 Share Posted June 16, 2016 please check if there is any where else that you have set timeout to 300 seconds that may override your PHP.ini file. try to search all files contains "set_time_limit(300)", to see if you can find it. or maybe your service provider does not allow you change the script timeout limit. Link to comment Share on other sites More sharing options...
shokinro Posted June 16, 2016 Share Posted June 16, 2016 you may also try to add line at beginning of method postProcess() in following file to see if it works or not. it should override any other timeout setting. YourStoreRoot/controllers/admin/AdminImportController.php Link to comment Share on other sites More sharing options...
RuthMoore Posted June 17, 2016 Share Posted June 17, 2016 I've changed the php.ini file, altering the time out value to 5400 seconds but it still times out after 300.>> Please set timeout to 3000 seconds Link to comment Share on other sites More sharing options...
shokinro Posted June 17, 2016 Share Posted June 17, 2016 (edited) have you tried to change that in AdminImportController.php as I suggested in previous post? if that does not work, I guess it might be related to your server limitation. Edited June 18, 2016 by shokinro (see edit history) Link to comment Share on other sites More sharing options...
Major Bob Posted June 17, 2016 Author Share Posted June 17, 2016 Shokinro: Thank you for your input. I've tried to modify AdminImportController.php as you suggested but it had no effect. I've also downloaded every file and searched through them for "set_time_limit(300)" and other similar queries. There were no relevant results. RuthMoore: Why do you suggest 3000 seconds? I've set it to 300,3000,5400 and there is no change whatever the value. One thing I have noticed is that the time out has been 300 seconds one day and 600 seconds the next day. What could cause this? My hosting provider is looking into the issue but believes it is something to do with the prestashop script. Link to comment Share on other sites More sharing options...
shokinro Posted June 18, 2016 Share Posted June 18, 2016 instead of searching "set_time_limit(300)", have you tried to search "set_time_limit("? Link to comment Share on other sites More sharing options...
RuthMoore Posted June 18, 2016 Share Posted June 18, 2016 (edited) I have read somewhere, 3000 is the max value. I don't really know for certain. Edited June 18, 2016 by RuthMoore (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted June 18, 2016 Share Posted June 18, 2016 I think it depends on your server configuration. Link to comment Share on other sites More sharing options...
Major Bob Posted June 20, 2016 Author Share Posted June 20, 2016 My hosting provider has indicated that the server configuration will allow a longer time than 300 or even 3000 seconds. I've searched for as small phrase as "time" and "300" and checked all PHP files. I've also been through each php.ini file and each one is set to a minimum of 5000. What strikes me as strange is how it normally times out at 300s but timed out at 600s for one day. Link to comment Share on other sites More sharing options...
shokinro Posted June 20, 2016 Share Posted June 20, 2016 maybe you can write a very simple test PHP script to loop 1000 times, for each loop sleep 3 sec. Place it under your store root and run the script to see if it will timeout or not. it is still times out, I think it is your server environment issue. nothing to do with PrestaShop. Link to comment Share on other sites More sharing options...
Major Bob Posted June 21, 2016 Author Share Posted June 21, 2016 (edited) That's a good idea. I've written a similar script and run it multiple times over varying sleep lengths to see what's going on. The script only finished in 5 cases out of 14 but the results showed that it didn't begin when I executed it, there was a delay before the script actually began(up to 215 seconds in one case). In the other 9 cases, the script appeared to run for over 900 seconds in each case before eventually showing 'The connection has reset' error. As it's not timing out at 300 seconds as before, I believe that Prestashop is at fault for the 300 second limit (rather than the server). There is obviously a delay before my script begins though and I think that this is shortening the 300s time limit imposed by Prestashop. Now I know a little bit more about the cause, but I have 2 problems instead of one. Edited June 21, 2016 by Major Bob (see edit history) Link to comment Share on other sites More sharing options...
Major Bob Posted November 28, 2016 Author Share Posted November 28, 2016 After a LOT of trial and error and troubleshooting, my host has realised that there is a set limit restricting timeouts to 300 seconds. However, they are adamant that this should be plenty of time and that there is an underlying issue with the Prestashop import process. Link to comment Share on other sites More sharing options...
Luca S. Posted November 30, 2016 Share Posted November 30, 2016 are you using nginx? Link to comment Share on other sites More sharing options...
Major Bob Posted November 30, 2016 Author Share Posted November 30, 2016 Hi Luca, It's on Apache Link to comment Share on other sites More sharing options...
Major Bob Posted December 2, 2016 Author Share Posted December 2, 2016 I've upgraded my store to 1.7.0.0 and tried to upload the exact same csv files again. All files were uploaded quickly and correctly, so the problem was mostly with the uploading process in the 1.6 back office. On a side-note, there is a progress bar in 1.7 that shows the status of the upload and an email is sent to confirm that uploading is complete. Great improvement Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now