Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1-Click Upgrade HTTP ERROR 500, when images 20K in presta #36106

Open
2 tasks done
LaurynasLTU opened this issue May 7, 2024 · 6 comments
Open
2 tasks done

1-Click Upgrade HTTP ERROR 500, when images 20K in presta #36106

LaurynasLTU opened this issue May 7, 2024 · 6 comments
Labels
8.0.x Branch Autoupgrade Module: autoupgrade Backlog SUE Added to the SUE backlog BO Category: Back Office Bug Type: Bug NMI Status: issue needs more information Waiting for QA Status: action required, waiting for test feedback

Comments

@LaurynasLTU
Copy link

Prerequisites

Describe the bug and add attachments

_1-Click Upgrade start HTTP ERROR 500, when products >20K with images in presta.

500-status-code

Expected behavior

When I start the program, I press configure - it takes about five minutes to load and the program is broken. It is not possible to use the program, it is not possible to update the version of prestashop. I noticed this error since presta stop version 8.1, because with 8.0.4 I still managed to update to version 8.0.5.

I noticed that the error is related to the pictures, on the new version of presta never have this error and everything works.

Somewhere in the forums it is written that you need to increase server resources, more ram, etc.

However, the solution is very simple, when you upload an empty image directory, everything works.

Make it so that there is no checking and counting of images by default, simply leave it to default to update prestashop without allowing and checking the image directory, whoever wants to, let them do backup, but by default do not touch the image directory.

Steps to reproduce

  1. go to prestashop 8.1.5 with 20k products with images when images innode 200k, with thousands folders
    2.. go to 1-Click Upgrade
  2. see 5oo error page do not load

PrestaShop version(s) where the bug happened

8.x

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

1-Click Upgrade

Your company or customer's name goes here (if applicable).

No response

@LaurynasLTU LaurynasLTU added Bug Type: Bug New New issue not yet processed by QA labels May 7, 2024
@Hlavtox
Copy link
Contributor

Hlavtox commented May 7, 2024

What more to say here - you just need to backup your shop on your own, using external tools.

Having 20k of products is just a next level of "merchanting" and you need better tools than to run some script with 300s timeout, expecting it to backup gigabytes of data.

Do your own backup.
Disable backup in autoupgrade or comment it out in the code.
Run upgrade. :-)

@Quetzacoalt91
Copy link
Member

This is likely related to the recursive check of writing access in the img/ folder, and the module relies on PrestaShopTest class:

public static function test_img_dir($dir)
{
return ConfigurationTest::test_dir($dir, true);
}

This folder is checked for restorations, where we bring back images saved in a backup.

There are 2 workarounds while we work on a potential fix:

@LaurynasLTU
Copy link
Author

I rename the image directory to image-2, upload a new presta default image directory and do the upgrade. But that is not written anywhere, it is a problem for thousands of people. And I discovered this after many trials and nerve wracking. There are already 600,000 innodes with presta on the server. When will you finally fix this mess with images.

@Hlavtox
Copy link
Contributor

Hlavtox commented May 8, 2024

@LaurynasLTU

But that is not written anywhere, it is a problem for thousands of people.

First off, this is not issue for thousands of people, when you are the first one to report it. There is obviously something wrong with your configuration, amount of data or bad permissions. I personally upgraded about 20 stores last month, and my colleague running a hosting company is regularily upgrading dozens of stores and there wasn't any issue about images.

When will you finally fix this mess with images.

We are not your servants. You get this software for free. If you don't like it, don't use it. If you want to use it, fix the issue and contribute back, so when you do the next upgrade, it works flawlessly even on your server.

@florine2623
Copy link
Contributor

ping @elyesnaouar for performance issue ^^

@florine2623 florine2623 added Waiting for QA Status: action required, waiting for test feedback BO Category: Back Office NMI Status: issue needs more information Autoupgrade Module: autoupgrade 8.0.x Branch and removed New New issue not yet processed by QA labels May 13, 2024
@venditdevs
Copy link
Contributor

venditdevs commented May 14, 2024

@LaurynasLTU, i would recommend to check your hosting performance/limitations. We have shops with a lot more products/images (biggest one has 250k+ products and 210K+ images) which update without a problem.

Most of the time it is a PHP limitation, let's say execution time, memory limit or another serverperformane related issue. considering the 5 minutes you've mentioned it's likely that your max_execution_time is set to 300. Keep in mind that there is a possibility that there's a overarching time-out setting on server level (Apache has this), if you don't have a own dedicated server you can configure you'll need to contact your hostingprovider.

image

@gericfo gericfo added the Backlog SUE Added to the SUE backlog label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.0.x Branch Autoupgrade Module: autoupgrade Backlog SUE Added to the SUE backlog BO Category: Back Office Bug Type: Bug NMI Status: issue needs more information Waiting for QA Status: action required, waiting for test feedback
Projects
None yet
Development

No branches or pull requests

6 participants