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

[5.x]: Timeout when accessing the product page and the cart and when creating a new variant #3743

Open
alina-wuethrich-ye opened this issue Oct 25, 2024 · 8 comments

Comments

@alina-wuethrich-ye
Copy link

What happened?

Description

After recently having updated to Craft CMS 5 and therefore also Craft Commerce 5 we are now experiencing problems with products/variants on the test and production system.

Steps to reproduce

There are three ways we can trigger the timeout.

Opening the product in the admin panel

Only a handful of the products are affected by this, which is why the problem has only been discovered now. We could so far not figure out a commonality between the affected products.

  1. Open Commerce > Products in the admin panel
  2. Click on a certain product

Expected behavior

The product page with the details opens.

Actual behavious

The product page never loads, a timeout time is reached and until then the whole Craft instance is not responsive (no other pages can be loaded).

Opening the cart which contains the product

Also only for the handful of affected products.

  1. In our webshop, click on the product, the detail page works
  2. Add it to the cart
  3. Open the cart

Expected behavior

The cart opens.

Actual behavious

The cart never loads, a timeout time is reached and until then the whole Craft instance is not responsive (no other pages can be loaded).

Creating a new product in the admin panel V1

  1. Open Commerce > Products
  2. Add a new product
  3. Save it before filling out anything
  4. As expected, an error is displayed that not all fields have been filled out
  5. Add a new variant

Creating a new product in the admin panel V2

  1. Open Commerce > Products
  2. Add a new product
  3. Save it
  4. As expected, the product is saved
  5. Now click on it again and add a variant

Expected behavior for both V1 and V2

The overlay opens where you can fill in the details of a new variant.

Actual behavious

The overlay is not opened, a spinner icon is displayed in the button, until a timeout time is reached and until the whole Craft instance is not responsive (no other pages can be loaded).

For all of these cases we do not see any errors in the Craft logs.

Craft CMS version

5.4.9

Craft Commerce version

5.2.1

PHP version

8.2.20

Operating system and version

Linux 3.10.0-1160.92.1.el7.x86_64

Database type and version

MariaDB 10.6.18

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.0-54)

Installed plugins and versions

No response

@lukeholder
Copy link
Member

lukeholder commented Oct 28, 2024

@alina-wuethrich-ye, Can you send your latest DB backup, composer.json, and composer.lock files to [email protected] - and reference this ticket? We can see if we can reproduce the issue and find the cause. Thanks!

@sandrodunkel
Copy link

+1 Same problem here on two of our Commerce 5 projects. In one case there was an issue with a specific product which we were able to delete locally – everything seemed to work from there. The second project has more than 1000+ products and some of them have the same issue. With this amount of products, commerce very quickly becomes a black box for both our client and us devs since nobody knows if the edit of a certain product will either work perfectly fine or bring the whole CMS to its knees.

@angrybrad
Copy link
Member

@sandrodunkel are you also running MariaDB? If so, what version?

@sandrodunkel
Copy link

@angrybrad Yes, we're running MariaDB 10.6.18, same as the original author of this issue. PHP 8.3.10, OS Linux 4.18.0-513.24.1.el8_9.x86_64

@alina-wuethrich-ye
Copy link
Author

A switch to MySQL 5.7.44 solved all of the issues. Thank you for the support, @angrybrad.

(An addition to the problem description: We figured out the problem only occured when dealing with products with exactly two variants, products with one and more than two variants worked just fine.)

@angrybrad
Copy link
Member

@sandrodunkel If upgrading to MySQL is an option, I'd suggest that. If not, then I'd at least try upgrading to MariaDB 10.10.1+.

We’ve seen a handful of related issues where this has solved the problem. I’m guessing it’s likely related to https://jira.mariadb.org/browse/MDEV-28852

@sandrodunkel
Copy link

We just updated to MariaDB 10.11.10 and can confirm that this fixed the issue for us as well. Thanks @angrybrad and @alina-wuethrich-ye!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants