-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random products show out of stock until manual reindex #15984
Comments
We have a problem in our shop which might be the same issue. Once in a while products seem to disappear from the cataloginventory_stock_status table. So far I haven't been able to find out what circumstances will trigger this disappearing of products, although I have an unconfirmed suspicion that it has something to do with large number of products being reindex via the mview scheduled indexer. |
Hi @AF4Q I cannot reproduce by your scenarious steps in clean magento , can you provide more information ? |
I resolved the problem, you need to set settings for indexer on save action System->Index manager chose checkbox stock -> set to -> update on save. In my case that work |
@engcom-backlog-nazar While changing the index to "UPDATE ON SAVE" may work around the issue, Magento actually recommends using the "UPDATE BY SCHEDULE" option for production environments. Here's a quote from a Magento Support ticket where I asked for Magento's official stance on this:
@AF4Q Is your "Stock" index set to "UPDATE ON SAVE" or "UPDATE BY SCHEDULE" when you're experiencing this? |
HI @AF4Q I checked this, the indexer oh state "UPDATE BY SCHEDULE" must be update partial and product may be changed. thank you for you report We've acknowledged the issue and added to our backlog. |
My indexer is set to UPDATE BY SCHEDULE and in the admin panel it shows that all indexes are valid. But still this issue persists. Upon running a manual index by SSH fixes the issue. |
code/vendor/magento/module-catalog-inventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php : _updateIndex The magento developers forget about bunch update by 1000 thus it's insert update to table and after it clean the data in the cataloginventory_stock_status |
Closing this issue — a fix for this has been applied and is available in v2.2.5 The fix for this can be located in #12205 |
Actually.. sorry, re-opening.. @engcom-backlog-nazar — is this something we could backport to affected versions? |
@matthew-muscat Close this is as duplicate to #15939 |
Hi, I am running Magento v2.2.5 but i am still experiencing the exact same issue that the product doesn't appear under the category until manual re-index is run. Whereas it appears straight away in the search (we are using klevu). Can anyone pass a reference form the Magento docs that refer this issue being included. I can't find it in any of the Magento release notes. |
I need help on this! Magento 2.3.1 here. After SKU 1000 skus magento updates the stock only for the next skus ignoring the first 1000. On 1160 sku i have salable quantity stock only for the last 160. |
Still an in issue in 2.3.3, this issue alone has at this point cost my client tens of thousands of dollars. Attempting to rip out the indexer itself at this point. Never will I suggest m2 to anyone, it's been 3 years of hell. |
As @Clud7 explained, this problem occurs when at least 1000 products of the same type are being reindex.
Now go to Gear->Bags for example and see no products. Stock index contains only around 1000 products instead of 2000. The problem is here, when 1000 products are processed they are updated and at the end of the loop all products are deleted. |
Let's reopen this one based on the last comments and on #12205 (comment), maybe somebody from Magento can try to reproduce this. Would it be enough to forward port 20d7afb to 2.3-develop? |
I have setup a new Magento store and have been adding products. I have recently noticed that some products are not showing up as out of stock on the front end despite being properly added in the admin panel (i.e. correct inventory, categories etc). Opening and saving these products a few times in the backend fixes this issue. Another way to fix this issue is manually running the reindex command from the SSH. All this time, the crons are properly running and according to the admin panel, the reindex is happening every minute.
Preconditions
Steps to reproduce
Expected result
Actual result
I have seem two similar issues on StackExchange as well and none of them have gotten a proper answer:
https://magento.stackexchange.com/questions/150656/new-products-not-showing-until-manually-reindexing-although-cron-is-running
https://magento.stackexchange.com/questions/1177/products-seemingly-randomly-disappearing-until-reindex
The text was updated successfully, but these errors were encountered: