ba1
25. Juni 2024 um 08:06
1
Hi,
I am working with a shop with large number of items. It is on the migration stage.
For some days I am facing an issue. The error is as follows
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1116 Too many tables; MySQL can only use 61 tables in a join
I am not able to update product from admin side.
I have deactivated all 3rd party plugins, no changes. Still error is there.
Anybody face something like this before?
So, is there any workaround to handle this situation?
I am using shopware 6.5.8.7
Thank you
Good morning,
this error is present since the early 20th but that doesn’t help you.
MariaDB und mySQL share the same join table limit.
I personally never hit that error message. Take a brief look at the SQL-Statement (or post it here, somewhat obfuscated to protect your privacy)
Try disabling some of your addons in a development environment and try again.
ba1
26. Juni 2024 um 08:01
3
Hi @chapter2 thanks for the feedback.
I deactivated all the plugins and checked again and still the issue repeated.
But the funny part is, later I noticed that the value get saved even if the error message comes up (So for now I can continue with the heavy workload).
There is no custom code running on the application so far I know.
No suspicious error message shown on the Shopware error log.
I will probably come back with more information after a closer look.
Thank you.
Hi together,
maybe it’s related to this issue:
offen 01:26PM - 24 Jun 25 UTC
priority/high
Platform(Default)
domain/inventory
### Shopware Version
6.6.10.4
### Affected area / extension
Platform(Default)…
### Actual behaviour
We have identified a problem with the product streams. Initial situation:
All articles and variants are created via API (the error is also in the admin).
We currently have over 1099 product streams (product_stream). These contain 5081 conditions (product_stream_filter). Approx. 1,050 product streams are assigned to categories, the others are for product comparison.
It still worked until Friday last week, then about 150 product groups were added and a threshold must have been exceeded.
If we now create new articles via the API or want to save an article in the admin, we get the error:
`Error thrown while handling message Shopware\Core\Content\Product\DataAbstractionLayer\ProductIndexingMessage. Removing from transport after 3 retries. Error: "Handling "Shopware\Core\Content\Product\DataAbstractionLayer\ProductIndexingMessage" failed: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join" {"class":"Shopware\\Core\\Content\\Product\\DataAbstractionLayer\\ProductIndexingMessage","message_id":null,"retryCount":3,"error":"Handling \"Shopware\\Core\\Content\\Product\\DataAbstractionLayer\\ProductIndexingMessage\" failed: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join","exception":"[object] (Symfony\\Component\\Messenger\\Exception\\HandlerFailedException(code: 1116): Handling \"Shopware\\Core\\Content\\Product\\DataAbstractionLayer\\ProductIndexingMessage\" failed: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join at /var/www/clients/client1/web2/web/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:124)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\DriverException(code: 1116): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join at /var/www/clients/client1/web2/web/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:118)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1116): SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join at /var/www/clients/client1/web2/web/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:24)\n[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1116 Too many tables; MariaDB can only use 61 tables in a join at /var/www/clients/client1/web2/web/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130)"} []`
### Expected behaviour
That there is no limit to the product groups or the processing of individual data.
### How to reproduce
If we delete one of the product groups again, the error no longer occurs.
For testing purposes, we left all product groups as they were and deleted all articles. We then recreated the articles using the API. We get the error with every call and the product_stream_mapping table is not filled.
We then deleted product groups (not all) and now it fills the product_stream_mapping table again.
### Definition of Done
- [ ] An automated test covers the fix.
- [ ] Integration/E2E testing in staging is done.
- [ ] Changelog markdown file created or updated in /changelog/_unreleased directory.
- [ ] Developer documentation written/updated.
- [ ] End user and/or developer documentation written or updated with clarification.
- [ ] Regression test created to ensure bug does not reappear, and automated regression tests pass.
- [ ] Code changes resolve the reported bug without introducing new issues.
Unfortunately there isn’t any solution so far.
It is possible that Shopware could fix this?
Seems to be a limit by MySQL/MariaDB: „…can only use 61 tables in a join“.
Could you fix it by yourself: reorganizing the products by splitting the products in 2 or more shops?
Write something about your products:
how many products and variants?
how many crossselling products are linked to products?
some extra fields on products?
ba1
28. Juni 2025 um 08:19
6
We have around 300, 000 products and too many cross selling products. We also have many custom fields also.
However for me the issue comes when I add Rule something like „Category - Alle Außer and give a 100 categories to validate“. If I reduce the category number to a lower number, no more issues.
But the same product stream associated is very much important for the feed generation. (And I am not ready to speak about feed generation using messenger. It is a sad story)
Thank you
Every generic system reaches limits at specific point.
You might need to write your own api endpoint or plugin, that uses pure sql instead of DAL. Then you will be fine.
ba1
28. Juni 2025 um 08:56
8
Yup. That’s what I did for now. But needed upgrade on the plugin also. Will do on the go.
Thank you
Shopware supports B2B shops so it should be possible to have a high amount of products, customer, custom fields etc.
Maybe get in contact directly with Shopware by booking an appointment on feedback.shopware.com .
You can also speak to Shopware with the topic „feed generation using messenger“.