Magento2: Configurable products are not saving with multiple associate products

Created on 18 Jan 2018  路  23Comments  路  Source: magento/magento2

Preconditions

  • Magento CE 2.1.10
  • PHP 7.09
  • MYSQL 5.7
  • Database migrated from 1.9.3 to 2.1.7, upgraded to 2.1.10, 2.2.2
  • Checked with different instance and various versions.
  • Configure highest possible server configuration.

Steps to reproduce

  • Saving a configurable product with 1000 simple product variations with 7 attributes

Expected result

Product should save < 30 seconds with no errors

Actual result

Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out. Sometime system crashed.
for smaller product, it will save, but may take 1-2 minutes
Simple product save instantly

ConfigurableProduct Confirmed P3 ready for dev Reproduced on 2.2.x Reproduced on 2.3.x S3 up for grabs

Most helpful comment

Same problem with Magento 2.2.4, I was able to create a configurable product with around 5000 variations but not anymore. Does it have to do with the increased size of db (150M), Now it won't even let me edit a prduct with 2000 variations (gatway times out after 15 mins).

Urgent issue I would say as this is fundamental of having an ecommerce store!

All 23 comments

@devenkuswa thank you for your report,
And what your expected result (30 sec.) is based on.

It is based on saving a configurable product with 1000 simple product variations with 7 attributes. Time is not my primary concern. It should save with all data which I am carrying.

@devenkuswa ,
On 2.2.2 version we tried to create a configurable product based on 7 drop-down attributes (4 of them having 2 values and 3 - 4 values). It had to contain as you may calculate out 1024 simple variations.
We had to wait for the loader for about 5 min. but all the necessary products (1024 simples and one configurable) were successfully created.
Please tell us whether we have lost any significant detail.
Also, please try to reproduce your issue on a clear instance of Magento 2.2.2 which is the latest release version for today.

Can you please check with 7-8 values for each drop-down? In that case, it will take very long time and will crash.

Please confirm you mean 7-8 values for each of 7 drop-down attributes. So that the maximum possible number of simple variations for this configurable product will vary between 823543 and 2097152, and we need to chose 1000 of them.

Exactly, We may have product between 1000 to 2000 among them.

Hello @devenkuswa. Sory for delay. So we created 7 attributes (first, third, fifth and seventh having 7 values per each and the others having 8 values per each). Then we tested two configurations:

  1. Selected 4 attributes with 2 values, and 3 attributes with 4 values per each - totally 1024 simple variations.
  2. Selected 7 attributes with 3 values per each - totally 2187 simple variations.
    In both cases we faced a successful saving.
    Would You please try out Your case on a clear instance of Magento. Thank You.

Can you please with below details? I tried with fresh Magento 2.2.2 instance.

  1. Select 7 attributes
  2. Select 6-5 option for each

I also tried with 'add product manually' feature. Please refer attached screens.

screenshot from 2018-02-15 14-18-33
screenshot from 2018-02-15 14-28-31
screenshot from 2018-02-15 14-28-46
screenshot from 2018-02-15 14-29-18
screenshot from 2018-02-15 14-29-29

So we are associating 16 products as shown in below screen.

screenshot from 2018-02-15 14-21-47

I got below error if proceed with above screens. I also tried by increasing memory size but got same issue and system got crashed.

screenshot from 2018-02-15 14-13-46

Hi again, @devenkuswa. Could You please make it clearer how have You created Your variations. We do not clearly comprehend at present how You have managed to associate only 16 products when You have 5-6 options selected for each of the 7 attributes. It turns out to appear a number of variations in range from 78125 to 279936 items. Before saving the configurable product You had to delete a huge number of variations proposed in configuration in order to leave only 16 of them. It doesn't seem to be quite realistic to tell the truth. So please explain us what we misunderstand.

I tried with various ways. One of them is as following:

  1. Created various simple products with relevant attribute values.
  2. Create configurable type product and select 7 attributes with single value for each. So it create single product. I remove that auto created simple product and add relevant simple products using 'Add Products Manually' feature with multi select products.

It works fine if number of attributes are less.

Thank You @devenkuswa, we'll check it asap.

@devenkuswa, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team Any update on this thread ?

Hi @devenkuswa
Unfortunately we don't have any updates as of now.

hello,
i am facing a similar issue.
Magento CE 2.2.3
PHP 7.1
MYSQL 5.7

I am trying to create a configurable product with about 26k variations... After 4h the system created 5k variations - it takes forever....

Are there any benchmarks? If i check the database i can see the system creates about 2 products per second... the php-fpm process on the ec2 instance takes only about 15% CPU... is there any way to speed up the product creation?

Best Regards
Simon

same problem here.
Magento CE 2.2.2, 2.2.3
Takes forever when is more than 1500 variations.
I increase everything on my local computer. Mysql goes up to 156% CPU usage.

@devenkuswa any fixes?

same problem, angry customers.

@haalmaguer @magento-engcom-team Not yet. Waiting for Magento's reply.

Same problem with Magento 2.2.4, I was able to create a configurable product with around 5000 variations but not anymore. Does it have to do with the increased size of db (150M), Now it won't even let me edit a prduct with 2000 variations (gatway times out after 15 mins).

Urgent issue I would say as this is fundamental of having an ecommerce store!

The same problem with 2.2.5 and 2.3
I was not able to create a configurable product with around 5900 variations.

@magento-engcom-team Any thoughts or updates?

@mslabko
@eugene-shab
Partial solution for the issue has been proposed on Kharkiv Contribution Day. Going to end it in closest time.
Its planned as the solution - to create json object for configurable_attributes_data on the client side and send it to the server side instead of multiple amounts of arguments (as its done now).
This will solve the problem with max_input_vars that can have place in the case of a large amount of the child products during configurable product saving.

Was this page helpful?
0 / 5 - 0 ratings