I have a category with 20000 products and 50 subcategories, while I tried to save that category at that time Magento go into infinite loop and after 10-15 min getting 500 error.

I have set 18000 max time out and 100000 max input vars. Also in front end category page showing empty and in HTML body shown as empty


Can anyone help me to resolve this issue? Magento version 2.1.6

  • You definitely have something else going on here. Total products and 50 sub categories isnt that bad in the big picture. Do you have any extra module not part of the core version? How did the categories get created and how did the products get categorized? Just from admin? Commented Aug 15, 2017 at 19:34
  • no i dont have any extra module but i have created category attribute @anthony-cicchelli Commented Aug 16, 2017 at 5:27

1 Answer 1


It could be an indexer going berserk. Are your indexers set on 'update on save' or 'update on schedule'. When they're set to 'update on save' try switching them to 'update on schedule'. Otherwise Magento starts reindexing your category/product relations when you're saving a category.

Another bottleneck might be the product url rewrites. Magento creates a lot of URL's, especially when products are set in multiple categories. To know if that's the case, check in your database your active processes when the server is crunching numbers on save.

A third option could be to increase the timeout or php memory limit. But I have to agree with Anthony Cicchelli: 20.000 products isn't that much. Any decent development or production server should be able to handle that with ease. Another attempt is to use a tool like xdebug to see what classes are clogging up your memory, or use the built-in profiler and/or check the log files.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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