-
Notifications
You must be signed in to change notification settings - Fork 170
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]: (Database overload) Issues loading element index (products) when variant stock is added to the view table #3800
Comments
I cant reproduce this. Could you try upgrading to 5.2.8 and see if you can reproduce it? Does it resolve itself after resaving the variants? |
Updated to 5.2.8. Problem still there. Resaving variants: is there a console command for this? |
So, did run resave/products which did hang. Checked the products and there was one with capitals in its variant SKU. I tried to edit that product but the CP threw a 500. I had a candidate. Lowercased its variants SKU in the db but no change. Ended up deleting that product and now the element index executes as expected. Don’t know for sure where that product was malformed. |
So my hoster said there is a database overload problem and locked the domain. It seems that Commerce creates that overload to show element indexes. Here is the query which they identified as a problem (they sent a screenshot): I’m puzzled by that since there are only some 50 products, one variant per product and two people operating the site. But anyhow: |
Hi @klick Thank you for the information. What database engine are you running? Are you seeing the same issue when running the project locally? Thanks! |
Hi @nfourtythree thanks for replying. On the remote → Server version: 10.6.18-MariaDB-log - MariaDB Server Also, the host requires the server to be referenced with the port attached: localhost:3306 in the .env. It works without but then changes in the project.yaml won’t get applied. If attached however, a database backup via the CP is not possible. Hoster is metanet.ch |
Hi @klick Thank you for the extra info. Are you running MySQL or MariaDB in ddev locally? It sounds like this might be the issue https://jira.mariadb.org/browse/MDEV-28852 the fix for which looks to have been included in MariaDB 10.10.1. Not sure if this is something that can be updated on your host? Or on a staging server to test to see if it makes a difference. |
Thank you @nfourtythree I will pass that on to the hosting company. Hopefully that will be it. Will get back here once I know more. |
Some additional info: Using the CP was generally slow but routinely errored out using a non-admin Account when viewing element indexes (products) or editing products itself. Here the variant window spinned forever before stopping with a server-error flyout. Those actions were unproblematic when using an admin-Account. |
So, the hosting company came back with the info that with the shared hosting plan of the client, the MariaDB-version can not be changed. They suggested a managed server instead. About ten times the price. I’m a bit shocked. Anything I could do on my end? |
@klick can you switch to MySQL? |
@lukeholder Unfortunately not. |
What happened?
Description
Loading element indexes errors out after loading for a few minutes when Stock is added to the view table. No report in storage/logs but the debug bar reveals a stack trace to the error.
Full Stack trace:
Steps to reproduce
Expected behavior
List element indexes (products).
Actual behavior
Craft CMS version
5.5.5
Craft Commerce version
5.2.7
PHP version
8.2.25
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: