# General error: 1116 Too many tables

**URL:** <https://forum.shopware.com/t/general-error-1116-too-many-tables/104368>\
**Category:** Programming (EN)\
**Tags:** administration, programming\
**Created:** [25. Juni 2024 um 08:06 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368 "2024-06-25T08:06:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ba1](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@ba1](https://forum.shopware.com/u/ba1)\
**Post date:** [25. Juni 2024 um 08:06 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/1 "2024-06-25T08:06:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chapter2](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@chapter2](https://forum.shopware.com/u/chapter2)\
**Post date:** [25. Juni 2024 um 22:37 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/2 "2024-06-25T22:37:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ba1](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@ba1](https://forum.shopware.com/u/ba1)\
**Post date:** [26. Juni 2024 um 08:01 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/3 "2024-06-26T08:01:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![7e5439c13c](https://avatars.discourse-cdn.com/v4/letter/7/ba8739/32.png) [@7e5439c13c](https://forum.shopware.com/u/7e5439c13c)\
**Post date:** [26. Juni 2025 um 09:51 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/4 "2025-06-26T09:51:16Z")

</div>

Hi together,  
maybe it’s related to this issue:

> <https://github.com/shopware/shopware/issues/10770>
>
> \### 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.

---

<div class="post-metadata">

**Author:** ![raymond-de](https://avatars.discourse-cdn.com/v4/letter/r/7feea3/32.png) [@raymond-de](https://forum.shopware.com/u/raymond-de)\
**Post date:** [27. Juni 2025 um 17:19 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/5 "2025-06-27T17:19:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ba1](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@ba1](https://forum.shopware.com/u/ba1)\
**Post date:** [28. Juni 2025 um 08:19 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/6 "2025-06-28T08:19:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [28. Juni 2025 um 08:39 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/7 "2025-06-28T08:39:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ba1](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@ba1](https://forum.shopware.com/u/ba1)\
**Post date:** [28. Juni 2025 um 08:56 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/8 "2025-06-28T08:56:01Z")

</div>

Yup. That’s what I did for now. But needed upgrade on the plugin also. Will do on the go.

Thank you

---

<div class="post-metadata">

**Author:** ![raymond-de](https://avatars.discourse-cdn.com/v4/letter/r/7feea3/32.png) [@raymond-de](https://forum.shopware.com/u/raymond-de)\
**Post date:** [28. Juni 2025 um 11:20 UTC](https://forum.shopware.com/t/general-error-1116-too-many-tables/104368/9 "2025-06-28T11:20:29Z")

</div>

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](http://feedback.shopware.com).

You can also speak to Shopware with the topic „feed generation using messenger“.
