-
Notifications
You must be signed in to change notification settings - Fork 340
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
All Products Disappear After Update of single Product #2093
Comments
Hi! |
@reviskar Unfortunately no, we still have the issue from time to time. Are you self-hosting Elastic, or using a service such as Amazon Elasticsearch Service? |
The local web hosting service we use is responsible for hosting the elasticsearch service, but take it as a self-hosting Elastic as it is installed on the same private server. |
@vahonc can you try to reproduce this one after your current tasks ? |
Ok, I'll try to investigate this issue. |
hi @vahonc seems issue for me also i am using Magento 2.4.1 with most configurable products, most of times my products disappers i have to do reindexing to show then again on listing page |
Hello all, I've tried to reproduce this issue on two local environments with the latest version of Magento EE (2.4.1, 2.4.2) and ES 2.10.3. In both cases, it was a clean version of Magento with default sample data and without any third-party modules. So I did some tests with a few configurable products (like SKU: MT12) and tried to assigned/unassigned/add to different categories and I didn't notice any issues with missing these products. It was successfully removed from all old categories and displayed in the new category. I'm not sure but it could depend on some specific structure of the catalog tree (start root point, multi-levels, etc.) or some indexes (price, products indexes) based on which ES builds their indexes, it also somehow could be linked with Cron. Anyway, we need more information from you guys, about your custom or specific configurations to be able more accurately reproduce or understand this issue. @duffner, could you please more detailed describe your configuration and the result which you have now? Are the products missing from all categories witch they were assigned? Check the product types and their configurations (visibility), root-level configuration. If it's possible try to check this issue on some test products and categories. @ia-gaurav please also add more details about your test conditions. Are the products missing after re-assigned from one category to another, or due to some other processes? BR, |
hi @vahonc - i was monitoring same for last 2 day , i did not got issue . Earlier i guess issue was due to - i was using same Indices Alias Name on 2 website on same server. I am still monitoring i did not faced issue from last 2 days. |
@ia-gaurav, thanks for your feedback! BR, |
@vahonc thanks for investigating. Did you try it in a multi-store environment? For us it still happens regularly (about once a week, because of our custom product importer cron), but it was fairly reproducible when elasticsuite indexes were set to "On Save" behavior:
@duffner any chance you have any Amasty modules installed? Maybe one or two of them could also be an issue. I'll try ruling them in/out aswell once I have time. |
Hello @reviskar, If I'm not wrong when you use a Cron for a custom product importer you should change the mode of all your indexes (or most important like product, price, catalogsearch, etc) to Also, I think that a mysql deadlock it smth definitely out of the ES module but I agree with you that some third-party modules like Amasty could impact this issue. BR, |
@vahonc that's what we did, but for reproducing purposes it allowed us to kind-of reproduce the issue. The problem still stands even with scheduling, that it seems like the indexer crash makes magento use another (newly created) index that is empty. |
@duffner, could you please provide us more details here, because we need some explanations for better understanding a start point for reproducing? BR, |
Hi @vahonc, the issue is that all products are missing from all categories. All products are Configurable products that are set at the root level category and child categories, however, the varients are set to not visible individually and are also not assigned to any categories. Is there anything else that would be helpful? My theory is as follows:
I feel that the issue relates to indexes being truncated before new ones are available to take their place. And I think the issue might be specific to configurable products when Child Products are not assigned to a category. As it appears the logic truncates the category assignment when it's replaced with the new one, but the new one doesn't have configurable product assignment. |
Hello @duffner,
Yes, this is possible. Please check in the Magento logs (exception.log or system.log) to see if there are any logged errors during re-indexing. BR, |
I don’t see anything at the current time in the logs. Unfortunately, my issue is not consistently reproducible. I will however check the logs once it happens again. |
There's a Magento patch which has just been updated which may be related: |
@vahonc The customers who had this issue were already on M2.4.2. As it says the fix from the patch should be in M2.4.2. |
@vahonc We found that after updating an attribute the products disappear. We also have this issue on our demo store (m2.4.2) where we dont have any other external modules than Smile ElasticSuite. The products disappeared after adding/changing product attributes. I found an Elastic error, perhaps it's related:
|
What kind of update did you proceed for your attribute @Esteraa ? |
@romainruaud Just creating and assigning products to new attributes, it wasn't clear what caused it as we noticed the products weren't shown later. Another customer told me he added an attribute to to show in the layered navigation and another also told me he adjusted settings at an attribute. So to me it's not very clear what caused it, seems if you change anything to an attribute it's already triggered. I can try to test some different actions on our demo environment this week, to see if I can reproduce. |
@Esteraa have you tried the patch from @ssx ? https://support.magento.com/hc/en-us/articles/360050636011-MDVA-30977-Magento-patch-missing-products-from-categories-indexing-related I don't know if my situation is the same as you, this is my issue #2137 , after applying the patch the bug is fixed. Thanks @ssx for the information. |
@meirzaicube We are already on m2.4.2 where the patch is included. |
@Esteraa I'm seeing it on a 2.4.2 installation as well. |
We just had this occur on another project, using the same versions. Somewhere, it appears that when an index is invalidated, it's deleted before a new one occurs, likely due to a cron overlap. My guess is that you truncate existing indexes before new ones are generated, and if something goes wrong with the server, new ones are never created, and the old ones are deleted, which leads to empty categories. The projects we have issues with have Huge Indexes from configurable products and tons of categories and customer groups. |
Team, I'd be willing to bet it's with the function >proceedIndexInstall, where inside it looks for old indexes and deletes them, but there isn't anything that I can see which ensures there is a new index to replace it. It appears this was handled for a different scenario by converting a deleteIndex, to a "cleanIndex" approach in a different model, however, this code does not leverage this type of feature.
|
not sure how far this was progressed but I was facing similar issue for one client |
We haven't had any reports of this in a while, either this means this was resolved unintentionally through routine Smile Updates "Great" or the customer just hasn't created us a new ticket in a while "Not Great". |
We have 2.4.2. and having the same issue. Before we have 2.4.0 and the situation was critical. With 2.4.2 upgrade situation improved, but still appeared a few times per month. We have Amasty modules, Firebear product import/export module which can affect successful reindex, but I hope this problem exists for many large stores. In our case 89K products, 1000 categories, ~2000 attributes and 3 stores. In my case we have a fast fix to again show products in categories: kill the current reindex process and execute bin/magento indexer:reset. In ~10 minutes products again available after FPC cache clean. |
We had a similar issue. All our categories were empty. I did not find any error logs, but I saw that the catalog_product index on ES was like 50Mo instead of 800Mo... The only log I found is this, but I think it is more a consequence than a cause :
|
We've seen recently similar issues on Smile projects : it was due to a failure happening during the catalog_category_product reindexing (a deadlock). This leads to "catalog_category_product_index" containing partial (or empty) data. But the next indexer, which is the catalogsearch_fulltext, will runs anyway and will then index nothing or nearly nothing related to products because they are not considered as belonging to categories or being visible. Do you have some evidences of failures from other indexes as well ? |
I did not see any logs about that in my case. However, in your case, it is a Magento issue then. In case of failure during catalog_category_product, there should be a transaction rollback, shouldn't it ? |
2 years old issue -> I close. Feel free to open a new one if needed. Regards |
Did anyone resolve this issue? We are still getting it on 2.4.2 |
We are noticing an issue when reassigning products, from one category to another. When we move a product from one category to another, the indexes are invalidated, but for some reason, all products are deleted from the website until the index refreshes.
#1075
The same Issue Experienced. ^^^
Preconditions
Magento Multi-Website, and Multiple Root Level Catalogs
100k products
Most Products Are configurable, not sure if this relates or not. Only Configurable Products are Assigned to a Category, Simples are not. I'm including this, because I'm curious if something with ElasticIndexing states that a product is not accessible until all children are available. But Might be completely wrong.
Magento Version : 2.4.1
ElasticSuite Version : 2.10.3
Environment : Production
Third party modules :
Steps to reproduce
Expected result
Actual result
Completed products are missing from categories until a full reindex is performed
The exact steps include actual SKUs in our Database, but these are more for our internal reference of this issue.
The text was updated successfully, but these errors were encountered: