magento2: catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue

Preconditions

  1. Magento 2.3-develop
  2. Sample data deployed (in order to easily have several test images in store)

Steps to reproduce

  1. php bin/magento catalog:images:resize

Expected result

  1. All 3422 images should be processed

Actual result

  1. Only 801 images are processed.
developer@reedling$ php bin/magento catalog:images:resize
 801/3422 [======>---------------------]  23% 14 mins 58.0 MiB  | /w/s/wsh12-red_main_2.jpg
Product images resized successfully
developer@reedling$

In my 2.2.6 development store which has 140 images, it always stops after exactly 100.

I can reproduce this issue on both 2.3-develop and 2.2.6.

Possible underlying Magento/Framework/DB/Query/Generator issue.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (16 by maintainers)

Commits related to this issue

Most upvoted comments

@gwharton - you were totally right! Bug is present in 2.2-develop branch and the reason in \Magento\Framework\DB\Query\BatchRangeIterator. This issue #12624 has fixed this problem in 2.3-develop branch, however, backport to 2.2-develop branch was not made. So I’ve made it in the scope of current PR https://github.com/magento/magento2/pull/18809 - you can check the fix here https://github.com/magento/magento2/pull/18809/commits/76bd08924e7e0f8a3fb88b3990623e5872b10760