A few specs: Using magento 2.1 PHP 7.0.9 VPS has 48GB RAM 8x Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz

I am setting up an online print shop, and have created a CSV of all of our 100k+ variations we offer. Our latest variation range is the leaflets, offering these on 6 different papers, 13+ sizes, 5+ lamination methods, 4+ delivery speeds, 20+ quantities. Some delivery speeds are not available on certain quantities etc, ad we end up with about 11k associated products on this 1 configurable product. Last night it all loaded fine, tried a bunch of the options, prices updated correctly etc. However this morning I tried it, and the page wouldnt even load. Upon logging into WHM and checking the CPU usage, alot of CPU was being used on 1 process.

11250 (Trace) (Kill) str 0 65.33 0.38 /opt/cpanel/ea-php70/root/usr/bin/php-cgi

Anyone know a way of trying to find out what could be causing it? Is it the fact Magento cant handle 11k associated products?

  • That's a really bad idea, you want a product configurator, there are a few around but it's quite complex. Magento doesn't like that many combinations so there's always going to be a tradeoff. – NirvanaServices Aug 24 '16 at 0:50

Most probably yes.

On the product page for a configurable product, Magento loads all simple products and builds a JSON structure with their attribute combination and prices so that the dropdowns and the selection price are updated correctly.

IIRC there are a few other places where the handling of configurable products is not suitable for a huge number of associated products.

It's possible to optimize them but with lots of effort, so I would first try to find a way to reduce the number of simple products per configurable product.

6 different papers, 13+ sizes, 5+ lamination methods, 4+ delivery speeds, 20+ quantities

You probably don't need separate stock management for each of these 11k variations, just for (paper/size) or not at all.

If "not at all", there's a quick win: create only one simple product and add everything as custom options:

  • paper type
  • size
  • lamination method
  • delivery speed

For the qty I would suggest to use the actual quantity input. You can change it from a text field to a dropdown with fixed values in the template if you need to.

If the price is not just the sum of the "component" types, custom options are not suitable out of the box, but in the event catalog_product_get_final_price you can recalculate the price of a configured product based on its custom options.

If you need stock management for the papers, I would consider a smaller configurable product with custom options.

  • Ahhh damn! Just spent a fair bit of money upgrading to this server too I guess I will have to look into splitting it down into a couple of listings. When it comes to printed leaflets etc., people need to be able to see the price for all variations on 1 page. Often buyers will switch between many options and price check a lot of variations. A similar company to us have 1 massive listing, but it looks like every time an option is chosen it does a quick refresh with the variations available for the option that changed. route1print.co.uk/flyers-leaflets/flyers – user42020 Aug 17 '16 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.