Answer the question
In order to leave comments, you need to log in
How to fix 504 server error due to prestashop?
In Prestashop's admin area, there is a "REGENERATE Thumbnails" section.
Like when you try to recreate both all the pictures at once, and separately (images, formats), even without deleting old images (Delete old images - NO), the server crashes in 504.
How to fix this problem?
Server:
4 cores 1200MHz
RAM: 8GB
HDD: 80GB SSD
Added execution time in php, apache and nginx to 600 seconds, but the error appears after 60. For some reason, nginx does not accept parameters. - Didn't work
Compressed images without loss of quality with linux utility, regenerated images, still 504
Maybe there is some batch tool in Prestashop to recreate thumbnails?
Answer the question
In order to leave comments, you need to log in
If the server is your own, then it will be easier to deal with the max_execution_time parameter. On hosting, this parameter should not be increased more than 120 seconds (usually).
You can try to run the _regenerateThumbnails function from controllers/admin/AdminImagesController.php via the console by packing it into a file:
<?php
//в корень сайта!!!
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/init.php');
_regenerateThumbnails('all', true);
echo 'Done!';
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question