I am using magento 2.4.1, the issue is randomly my product's quantity is increasing, it automatically increments the quantity after some time. I tried to keep eye on few products and found that each products increment was different. I checked in logs also but none were generated.

i check somewhere and found that "sales_clean_orders" cron is the reason behind this. but even after disable the cron my product quantity is still increasing.

does anyone know what exactly "sales_clean_orders" cron do to product quantity?

2 Answers 2


Cron sales_clean_orders - Cleans Expired Orders

First Run these CLI Commands

php bin/magento indexer:reset


Then Keep an Check If Product Qty Increases.

If Yes - Can you see any canceled orders with those products? As an Quick Fix (Which is Never Recommended), You can comment out the cron listed in



php bin/magento cron:remove

php bin/magento cron:install -f

In the mean time keep checking, If you are using any Custom Payment Method & had an Observer

  1. order_cancel_after
  2. sales_order_save_after
  3. sales_order_state_change_before

May be there is some buggy code there.

Check the screenshot for more details

enter image description here


See here, at our site it had to do with discount rules:


The sales_clean_orders cron could not cancel the order and tries it each hour. But it actually does increase the stock level each time it tries...

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.