Magento ver. 2.4.2-p1
Amasty extensions
We used to have Elastic Search crash every once in a while but this is no longer happening since we upgraded to the most powerful server.
We had instances where couple of times a month, when you click on any category - the products would not load and it shows the following Error:
We can't find products matching the selection.
This now happens once a day.
Usually, running the following fixes the issue:
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
so I've set up cron jobs to run these every 2 hours or so but there is also an issue where running:
php bin/magento setup:di:compile
does not work (it gives an Error about some generated folder not being empty). When that happens, running it in this order seems to work:
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
But this still leaves us with website downtime. The products on the front page load always but the issue appears for all products in all categories when it comes up.
I've googled this and tried running the following:
select * from mget_catalog_eav_attribute cea join mget_eav_attribute ea on ea.attribute_id = cea.attribute_id and backend_type in ('text', 'varchar') where cea.is_filterable = 1;
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0007 seconds.)
update mget_catalog_eav_attribute cea
join mget_eav_attribute ea
on ea.attribute_id = cea.attribute_id
and backend_type in ('text', 'varchar')
set cea.is_filterable = 0
where
cea.is_filterable = 1
0 rows affected. (Query took 0.0008 seconds.)
How can I narrow down where the problem is coming from and how to fix it permanently?
BTW - this is the Error that sometimes comes up when running:
php bin/magento setup:di:compile
The directory "/home/MYWEBSITE/public_html/generated/code/Magento/Framework" cannot be deleted Warning!rmdir(/home/MYWEBSITE/public_html/generated/code/Magento/Framework): Directory not empty
UPDATED on April 15th at 20:32 MST: It just happened again and just running re-index ( php bin/magento indexer:reindex ) has made it work (to load the products in categories). I pulled the log files and here is the recent content:
debug.log:
[2023-04-16T02:04:26.262557+00:00] main.INFO: Broken reference: the 'product_view_custom_block' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:04:26.262844+00:00] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and 'porto_header' respectively. [] []
[2023-04-16T02:04:26.262986+00:00] main.INFO: Broken reference: the 'catalog.compare.link' tries to reorder itself towards 'top.links', but their parents are different: 'header.links' and 'header.panel' respectively. [] []
[2023-04-16T02:04:26.263171+00:00] main.INFO: Broken reference: the 'sw.sidenav' tries to reorder itself towards 'category_leftnav', but their parents are different: 'sidebar.main' and '' respectively. [] []
[2023-04-16T02:04:26.263270+00:00] main.INFO: Broken reference: the 'sidebar_second_block' tries to reorder itself towards '', but their parents are different: 'sidebar.second' and '' respectively. [] []
[2023-04-16T02:04:26.263454+00:00] main.INFO: Broken reference: the 'skip_gallery_before' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_before.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:04:26.263562+00:00] main.INFO: Broken reference: the 'skip_gallery_after' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_after.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:04:26.263722+00:00] main.INFO: Broken reference: the 'product_view_custom_block' tries to reorder itself towards '', but their parents are different: 'sidebar.additional' and '' respectively. [] []
[2023-04-16T02:04:26.264150+00:00] main.WARNING: Broken reference: The element with the "sidebar.additional" ID wasn't found. Verify the ID and try again. [] []
[2023-04-16T02:14:22.931273+00:00] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.931788+00:00] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932083+00:00] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932279+00:00] main.INFO: Broken reference: the 'sw.sidenav' element cannot be added as child to 'sidebar.main', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932386+00:00] main.INFO: Broken reference: the 'sidebar_second_block' element cannot be added as child to 'sidebar.second', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932982+00:00] main.INFO: Broken reference: the 'product_view_custom_block' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.933254+00:00] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and 'porto_header' respectively. [] []
[2023-04-16T02:14:22.933417+00:00] main.INFO: Broken reference: the 'catalog.compare.link' tries to reorder itself towards 'top.links', but their parents are different: 'header.links' and 'header.panel' respectively. [] []
[2023-04-16T02:14:22.933612+00:00] main.INFO: Broken reference: the 'sw.sidenav' tries to reorder itself towards 'category_leftnav', but their parents are different: 'sidebar.main' and '' respectively. [] []
[2023-04-16T02:14:22.933704+00:00] main.INFO: Broken reference: the 'sidebar_second_block' tries to reorder itself towards '', but their parents are different: 'sidebar.second' and '' respectively. [] []
[2023-04-16T02:14:22.933864+00:00] main.INFO: Broken reference: the 'skip_gallery_before' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_before.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:14:22.934010+00:00] main.INFO: Broken reference: the 'skip_gallery_after' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_after.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:14:22.934187+00:00] main.INFO: Broken reference: the 'product_view_custom_block' tries to reorder itself towards '', but their parents are different: 'sidebar.additional' and '' respectively. [] []
[2023-04-16T02:14:22.934592+00:00] main.WARNING: Broken reference: The element with the "sidebar.additional" ID wasn't found. Verify the ID and try again. [] []
system.log:
[2023-04-16T01:58:48.711458+00:00] main.WARNING: Broken reference: The element with the "sidebar.additional" ID wasn't found. Verify the ID and try again. [] []
[2023-04-16T02:04:26.260952+00:00] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:04:26.261397+00:00] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:04:26.261686+00:00] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:04:26.261880+00:00] main.INFO: Broken reference: the 'sw.sidenav' element cannot be added as child to 'sidebar.main', because the latter doesn't exist [] []
[2023-04-16T02:04:26.261979+00:00] main.INFO: Broken reference: the 'sidebar_second_block' element cannot be added as child to 'sidebar.second', because the latter doesn't exist [] []
[2023-04-16T02:04:26.262557+00:00] main.INFO: Broken reference: the 'product_view_custom_block' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:04:26.262844+00:00] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and 'porto_header' respectively. [] []
[2023-04-16T02:04:26.262986+00:00] main.INFO: Broken reference: the 'catalog.compare.link' tries to reorder itself towards 'top.links', but their parents are different: 'header.links' and 'header.panel' respectively. [] []
[2023-04-16T02:04:26.263171+00:00] main.INFO: Broken reference: the 'sw.sidenav' tries to reorder itself towards 'category_leftnav', but their parents are different: 'sidebar.main' and '' respectively. [] []
[2023-04-16T02:04:26.263270+00:00] main.INFO: Broken reference: the 'sidebar_second_block' tries to reorder itself towards '', but their parents are different: 'sidebar.second' and '' respectively. [] []
[2023-04-16T02:04:26.263454+00:00] main.INFO: Broken reference: the 'skip_gallery_before' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_before.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:04:26.263562+00:00] main.INFO: Broken reference: the 'skip_gallery_after' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_after.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:04:26.263722+00:00] main.INFO: Broken reference: the 'product_view_custom_block' tries to reorder itself towards '', but their parents are different: 'sidebar.additional' and '' respectively. [] []
[2023-04-16T02:04:26.264150+00:00] main.WARNING: Broken reference: The element with the "sidebar.additional" ID wasn't found. Verify the ID and try again. [] []
[2023-04-16T02:14:22.931273+00:00] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.931788+00:00] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932083+00:00] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932279+00:00] main.INFO: Broken reference: the 'sw.sidenav' element cannot be added as child to 'sidebar.main', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932386+00:00] main.INFO: Broken reference: the 'sidebar_second_block' element cannot be added as child to 'sidebar.second', because the latter doesn't exist [] []
[2023-04-16T02:14:22.932982+00:00] main.INFO: Broken reference: the 'product_view_custom_block' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2023-04-16T02:14:22.933254+00:00] main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and 'porto_header' respectively. [] []
[2023-04-16T02:14:22.933417+00:00] main.INFO: Broken reference: the 'catalog.compare.link' tries to reorder itself towards 'top.links', but their parents are different: 'header.links' and 'header.panel' respectively. [] []
[2023-04-16T02:14:22.933612+00:00] main.INFO: Broken reference: the 'sw.sidenav' tries to reorder itself towards 'category_leftnav', but their parents are different: 'sidebar.main' and '' respectively. [] []
[2023-04-16T02:14:22.933704+00:00] main.INFO: Broken reference: the 'sidebar_second_block' tries to reorder itself towards '', but their parents are different: 'sidebar.second' and '' respectively. [] []
[2023-04-16T02:14:22.933864+00:00] main.INFO: Broken reference: the 'skip_gallery_before' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_before.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:14:22.934010+00:00] main.INFO: Broken reference: the 'skip_gallery_after' tries to reorder itself towards 'product.info.media.image', but their parents are different: 'skip_gallery_after.wrapper' and 'product.info.media' respectively. [] []
[2023-04-16T02:14:22.934187+00:00] main.INFO: Broken reference: the 'product_view_custom_block' tries to reorder itself towards '', but their parents are different: 'sidebar.additional' and '' respectively. [] []
[2023-04-16T02:14:22.934592+00:00] main.WARNING: Broken reference: The element with the "sidebar.additional" ID wasn't found. Verify the ID and try again. [] []
So it turns out I've been checking the log files for the wrong website!
I have an old (current production) site - let's call it WEBSITE-OLD. This is Magento ver. 2.4.2-p1.
Because of various problems with WEBSITE-OLD, I am setting up WEBSITE-NEW. I have exported the products out of this WEBSITE-OLD and imported them into WEBSITE-NEW which is Magento ver. 2.4.5-p1 via:
- System - Data Transfer - Export/Import
Now I can't check the log files on WEBSITE-OLD because of the size:
debug.log = 5.04 GB system.log = 4.30 GB
(I don't think I will be able to open files of this size)
So my plan is to delete both debug.log and system.log and let them re-create, then wait for the problem to appear and retrieve the information from the log files.
The interesting part is this:
- I've gone into a random category on WEBSITE-NEW and the products loaded as expected. I have then clicked on the drop-down to display 36 products and then, when the website was trying to load them, it gave the same Error instead (and this is a different Magento installation just the products are the same):
We can't find products matching the selection.
This is a huge problem for me because I am setting up WEBSITE-NEW precisly for the reason to get away from all the problems we've had (and still are having) on WEBSITE-OLD!
This are last few lines from EXCEPTION.LOG on WEBSITE-OLD:
main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [position_category_165] in order to sort on","index_uuid":"28MvSM-OQQiKdIzGbAF6pw","index":"magento2_product_2_v729"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_2_v729","node":"XhwuvdhtRH6fh3djNV8f9A","reason":{"type":"query_shard_exception","reason":"No mapping found for [position_category_165] in order to sort on","index_uuid":"28MvSM-OQQiKdIzGbAF6pw","index":"magento2_product_2_v729"}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_165] in order to sort on\",\"index_uuid\":\"28MvSM-OQQiKdIzGbAF6pw\",\"index\":\"magento2_product_2_v729\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_2_v729\",\"node\":\"XhwuvdhtRH6fh3djNV8f9A\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_165] in order to sort on\",\"index_uuid\":\"28MvSM-OQQiKdIzGbAF6pw\",\"index\":\"magento2_product_2_v729\"}}]},\"status\":400} at /home/denvergardenpros/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
[2023-04-18 02:47:56] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [position_category_193] in order to sort on","index_uuid":"28MvSM-OQQiKdIzGbAF6pw","index":"magento2_product_2_v729"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_2_v729","node":"XhwuvdhtRH6fh3djNV8f9A","reason":{"type":"query_shard_exception","reason":"No mapping found for [position_category_193] in order to sort on","index_uuid":"28MvSM-OQQiKdIzGbAF6pw","index":"magento2_product_2_v729"}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_193] in order to sort on\",\"index_uuid\":\"28MvSM-OQQiKdIzGbAF6pw\",\"index\":\"magento2_product_2_v729\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_2_v729\",\"node\":\"XhwuvdhtRH6fh3djNV8f9A\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_193] in order to sort on\",\"index_uuid\":\"28MvSM-OQQiKdIzGbAF6pw\",\"index\":\"magento2_product_2_v729\"}}]},\"status\":400} at /home/denvergardenpros/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
[2023-04-18 02:51:31] main.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v752","node":"XhwuvdhtRH6fh3djNV8f9A","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]","caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v752\",\"node\":\"XhwuvdhtRH6fh3djNV8f9A\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}},\"status\":400} at /home/denvergardenpros/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
[2023-04-18 02:51:50] main.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v752","node":"XhwuvdhtRH6fh3djNV8f9A","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]","caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v752\",\"node\":\"XhwuvdhtRH6fh3djNV8f9A\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}},\"status\":400} at /home/denvergardenpros/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
[2023-04-18 02:51:57] main.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v752","node":"XhwuvdhtRH6fh3djNV8f9A","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]","caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v752\",\"node\":\"XhwuvdhtRH6fh3djNV8f9A\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}},\"status\":400} at /home/denvergardenpros/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
[2023-04-18 02:55:06] main.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_2_v729","node":"XhwuvdhtRH6fh3djNV8f9A","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]","caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [featured_value]"}}},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_2_v729\",\"node\":\"XhwuvdhtRH6fh3djNV8f9A\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [featured_value]\"}}},\"status\":400} at /home/denvergardenpros/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
UPDATED on May 12th, 2023.
Magento 2.4.5-p1
Smartwave Porto theme
There is no NginX running on my hosting server
This is also happening on the new Magento 2.4.5-p1 website I'm building.
There are 4 problems:
1. Products in categories will load for a while and then (in less than half an hour) - when you click on a Category, it will just say the following and NOT load any products:
We can't find products matching the selection.
It has just happened now, I have gone through all of the categories and it appears only 4 categories load products as expected and 25 categories do not.
When this happens, deleting Cache, re-indexing and the following commands (at times) must be run in order to bring the products back:
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
2. Just clicking through on the Categories sometimes goes into a blank page for a little while which shows the following Error:
This site can’t be reached
The web page at https://EXAMPLE.com/new/admin/cache/massRefresh/ might be temporarily down or it may have moved permanently to a new web address.
ERR_HTTP2_PROTOCOL_ERROR
This stays on for a few seconds and then (without me doing anything) loads the page as expected.
3. Searching does not work even-though Elasticsearch is up and running and we are running Elasticsearch 7.10.2.
4. When saving a category after making a change, the system will sometimes give the following Error:
Attention
Something went wrong.
A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.
While on the second try to save, it will save.
So the only common thing to both my old Magento 2.4.2-p1 site and the new Magento 2.4.5-p1 site I'm building are the products which were moved over via the Export/Import tool in the Admin panel. My colleague has put the products in manually and it is very likely that he put in spaces in places where they do not belong and illegal characters. I am willing to go through all the products manually and check/correct this if it is likely causing the problem. What specifically would I be looking for? What is NOT allowed and which characters where could be causing this type of an issue?
Here is my debug.log:
https://codepen.io/Allysin/pen/bGmKMag
Here is my system.log:
https://codepen.io/Allysin/pen/OJBEZZR
UPDATED on May 17th, 2023:
Here is the result of:
"curl localhost:9200/_cat/indices"
yellow open magento242_product_2_v3 3ZbW-3DNQKKgJCf9sVPUKA 1 1 1426 0 2.8mb 2.8mb
yellow open magento242_product_1_v3 57soJCbEQOiyHPg8IgMs2g 1 1 1238 0 1.7mb 1.7mb
yellow open magento2_product_7_v2327 jDcWA1grQWqywd3Bk9nj3Q 1 1 953 0 1.1mb 1.1mb
yellow open magento2_product_4_v2553 aDP2Qg2XRRO_tbEtNXNTHA 1 1 133 0 133.6kb 133.6kb
yellow open magento2_product_1_v2584 XPKMX3z7R9u3v_YfRd7z1g 1 1 1238 0 1.7mb 1.7mb
yellow open magento2_product_3_v2557 _RKvvPYXQminE94uV17Asg 1 1 996 0 2.1mb 2.1mb
yellow open magento2_product_5_v573 x9VuHClhTjO8ZiB3Bhe5YA 1 1 133 0 123.8kb 123.8kb
yellow open magento2_product_8_v215 TkhDhKcOSLaid7YD5_182A 1 1 2048 1 3.4mb 3.4mb
yellow open magento242_product_7_v3 p-NXTQqcRl2bz7pBC0fVfw 1 1 953 0 1.1mb 1.1mb
yellow open magento2_product_2_v2561 OYnOtLBuQiOzVLmaoz9MRw 1 1 1426 0 2.8mb 2.8mb
yellow open magento2_product_6_v432 QvDDCpARS2SZ2DA_nvKjcw 1 1 0 0 208b 208b
yellow open magento242_product_3_v3 0zNj2ec9Sz6pVwZSFtGRhw 1 1 996 0 2mb 2mb
yellow open magento242_product_4_v3 aUTsIo8FRDuH_vwgfSKrCQ 1 1 133 0 133.5kb 133.5kb
UPDATED on May 19th, 2023:
So I spoke too soon! (I thought the problem was resolved but it is not).
I have a total of 40 categories on the front page. Out of these:
- 32 were loading products as expected
and
- 8 specific ones were not
I ran:
php bin/magento indexer:reindex
and it did NOT solve the problem.
I then ran:
php bin/magento setup:di:compile
and this brought all the products back into the 8 categories which were missing them!
I do NOT have:
/var/log/elasticsearch/elasticsearch.log and /var/log/elasticsearch/gc.log
as Vivek Kumar suggested (to check).
What else can I try to do please?