tempomania Posted March 20, 2010 Share Posted March 20, 2010 Hi,each time I try to regenerate thumbnails I get a message "504 - Gateway time-out"do you have any ideas?should I modify my PHP.ini?Any help is highly appreciated.Thanks in advance Link to comment Share on other sites More sharing options...
welsafty Posted March 20, 2010 Share Posted March 20, 2010 this is a common problem that happens with most of us wehn you start getting a larg number of products in your prestashop, at first when you ware playing arround it was cool to find out that you can resize all your thumbnails and even change the watermark and click on button and wwwoooaalaah you are done, the real problem is when you start having larg number of items in your store, probably with multiple images forr each product, the number of original images starts building up very fast , and when you decide it is time to regenerate the thumbnail the script starts by deleting existing thumbnails and attmepts to regenerat them again with the new settings you have (thumbnail size and watermark) , this script does everything in one process so the more products you have the longer this process will take and it may (probably will) time out before telling you what went wrong and not showing you the progress while it is working on regenerating those images , the only thing you can be sure of is that the moment you clicked that regenerate button you lost all your existing thumbnails 2 things you can do to get your thumbnails back the first option is to change you php.ini and change the timeout setting to give processes more time to finish working before comming back at you with the time-out error the secound option is to get all the images from your server, and put them on your localhost and regenerat the thumbnails locally then upload them to your server again this problemm was somehow reduced in the 1.3 prestashop release , in this release the regeneration tool gives you option to select what o regeneate the thumbnil for , s yocan chooe o regeeae oly ctgoreima, or only product images, and hen you choose to reeete the product thumna ou can have the option to iether generate all thumbnail sizes or select one size to regenerate at a time , it is a god step on tright diat least the redused te problem into only 1/5th of the problem , but still if you cant change the php.ini to give your script more time to run before timing out you will end up with time out the more your products database grow Link to comment Share on other sites More sharing options...
tempomania Posted March 21, 2010 Author Share Posted March 21, 2010 Hi Thank you so much for your kind reply. 2 things you can do to get your thumbnails back the first option is to change you php.ini and change the timeout setting to give processes more time to finish working before comming back at you with the time-out error When I reset all the regeneration items back to the original installation of PS despite the fact that I still get the error my thumbs are back again there like in a fresh installation so it seem the script works only when you have the original configuration of thumbs. but still if you cant change the php.ini to give your script more time to run before timing out you will end up with time out the more your products database grow I've modified my php.ini in such a way to allow the script to execute for 240 sec and the server to wait 240 before issuing a timeout, yet nothing changes so...I wonder if there is a reasonable way to change thumbs with 1.2.5Thank you so much again! Link to comment Share on other sites More sharing options...
shopimport.nl Posted April 13, 2010 Share Posted April 13, 2010 I also noticed that the regeneration of thumbnails ran out of memory. I got the PHP message in the server error_log file: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11716 bytes) in images.inc.php on line 210, referer: admin1234/index.php?tab=AdminImages&token;=..So I editted the admin1234/index.php and put this on top to extend memory to 400M but you can try to start with a low limit e.g. 40M. Sometimes PHP really needs a lot of memory to create thumbnails. It's very depending on the originals.It's also possible to overrule the timeout when the web server is allowing this with the set_time_limit PHP command.So I put these lines just after the header comment block in admin1234/index.php one line below the first */ ini_set("memory_limit", "400M"); set_time_limit(600); Link to comment Share on other sites More sharing options...
tempomania Posted April 13, 2010 Author Share Posted April 13, 2010 Thanks, I've tried following your guidelines and this is what I get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. so it seems it's not working as another error comes out.Fortunately I've done it with a test server.Thanks Link to comment Share on other sites More sharing options...
mir-aus Posted May 5, 2010 Share Posted May 5, 2010 HI thereI have same problem , any one find the way?I can not use regeneration...Thanks in advance Link to comment Share on other sites More sharing options...
daelew Posted January 20, 2011 Share Posted January 20, 2011 set time to -1 (no limit) Link to comment Share on other sites More sharing options...
tecknow Posted June 14, 2012 Share Posted June 14, 2012 Where do you - set time to -1 (no limit) ??? Is this a php.ini setting on the server or in a Prestashop file on the server? Link to comment Share on other sites More sharing options...
globosoftware.net Posted July 7, 2013 Share Posted July 7, 2013 I also noticed that the regeneration of thumbnails ran out of memory. I got the PHP message in the server error_log file: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11716 bytes) in images.inc.php on line 210, referer: admin1234/index.php?tab=AdminImages&token;=.. So I editted the admin1234/index.php and put this on top to extend memory to 400M but you can try to start with a low limit e.g. 40M. Sometimes PHP really needs a lot of memory to create thumbnails. It's very depending on the originals. It's also possible to overrule the timeout when the web server is allowing this with the set_time_limit PHP command. So I put these lines just after the header comment block in admin1234/index.php one line below the first */ ini_set("memory_limit", "400M"); set_time_limit(600); Thank for your solution. It worked. :v :v Link to comment Share on other sites More sharing options...
electrical-store Posted April 3, 2014 Share Posted April 3, 2014 I have the same problem. Can someone tell me please where I can find 1234/index.php. I am using version 1.5.3.1. Many Thanks. 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