Web Farm Cache

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 2 años
We have been doing a lot of testing with web farms and have come across a couple issues. I believe I saw the first issue identified in another post but have not noticed any comments regarding the second item.

We have two web farms setup. One is using redis and the other sql server for distributed cache. The issues we are seeing are:

1) Admin Area: After installing a plugin we go to configure the plugin or make other setting changes then click save, the page refreshes but the changes are not being shown on the configuration page. The original values persist. Clearing the redis or sql server distributed cache corrects the issue and saving changes to configuration or settings begin working again.

2) Public Store: We have six servers setup in each web farm. Both the Redis and SQL Server distributed cache product the same issue.  When we add items to the cart the green notification bar up top states the item has been added to the cart but when you go to the cart the item is sometimes not there.  Refreshing the page (ctl-shift-r) reloads the page but the item is not there. Continuing to shop / adding more items then going to the cart will sometimes magically load the item that had not been added before. We are seeing the same type of issue when trying to delete items from the cart. i.e. deleting and item reloads the page but the item will not delete. If we continue shopping and come back to delete the item again it will sometimes delete.

Neither issue happens when using a single instance of NopCommerce without distributed cache.

Any input would be appreciated!
Hace 2 años
Looks like web farms are not properly configured. Have you followed instructions described here?
Hace 2 años
Yes, we have followed the documentation very carefully at the link provided.

I believe item 1 will be addressed with this work item:
https://github.com/nopSolutions/nopCommerce/issues/5593

We are setup using Distributed File System Replication (DFSR) for Local Content Infrastructure. Items in the four folders are replicating as expected. All contain the same DataProtection keys.
/App_Data
/Plugins
/Themes
/wwwroot

We have tried switching up the server farm with just two servers vs the six we have setup. We have tried different combinations of  two server web farms. All end up with the issue of items not showing up in the cart when they are added or not being deleted from the cart when the delete x is clicked. Again this isn't always happening but the issue does happen often.

I'm not sure what we may have setup incorrectly but any additional thoughts would be appreciated.
Hace 2 años
As we continue looking into this issue we are seeing that when we click add item, the items are ALWAYS added to the ShoppingCartItem table (They just do not always show up in the cart after being added).
When we click delete item on the cart page the items are ALWAYS removed from the ShoppingCartItem table (They just do not disappear from the cart page when deleted).
Hace 2 años
It looks like something is not being updated correctly in the distributed cache when an item is added or deleted. The first item is always added correctly then its random after that. Some items add and some do not.

If we wait for the Short term cache to expire and reload the page the items appear. The same thing is happening for deleting items. Once short term cache expires all is good again, items show or disappear as expected. So the questions is what is not right with caching? It could be our setup but we are leaning away from that. As mentioned we have two separate farms setup. One on Redis and the other using SQL Server for distributed cache.  Both have the same issue. Of course the same guy (me) :) setup both web farms following the documentation very carefully!

If we remove all servers but one from the IIS web farm all is working as expected. As soon as we add a second server to either web farm the issue shows up again.

We are using applications in the path domain.com/US/ or domain.com/MX/. We have changed one of the web farms to no longer use applications however the issue persists (i.e. domain.com). We also unchecked "SEO friendly URLs with multiple languages" just to make sure the url pathing was not causing any issues.

We have spent hours and hours testing, retesting, reevaluating our setup with web farms. As long as we  wait for short term cache to expire everything refreshes and is working great.  

We need to get to the bottom of this asap so any additional help would be greatly appreciated.
please see the video of what we are seeing below:

https://www.youtube.com/watch?v=Ij_x9jPvw2Q&t=5s
Hace 2 años
brandon71 wrote:
It looks like something is not being updated correctly in the distributed cache when an item is added or deleted. The first item is always added correctly then its random after that. Some items add and some do not.

If we wait for the Short term cache to expire and reload the page the items appear. The same thing is happening for deleting items. Once short term cache expires all is good again, items show or disappear as expected. So the questions is what is not right with caching? It could be our setup but we are leaning away from that. As mentioned we have two separate farms setup. One on Redis and the other using SQL Server for distributed cache.  Both have the same issue. Of course the same guy (me) :) setup both web farms following the documentation very carefully!

If we remove all servers but one from the IIS web farm all is working as expected. As soon as we add a second server to either web farm the issue shows up again.

We are using applications in the path domain.com/US/ or domain.com/MX/. We have changed one of the web farms to no longer use applications however the issue persists (i.e. domain.com). We also unchecked "SEO friendly URLs with multiple languages" just to make sure the url pathing was not causing any issues.

We have spent hours and hours testing, retesting, reevaluating our setup with web farms. As long as we  wait for short term cache to expire everything refreshes and is working great.  

We need to get to the bottom of this asap so any additional help would be greatly appreciated.
please see the video of what we are seeing below:

https://www.youtube.com/watch?v=Ij_x9jPvw2Q&t=5s


I have the same caching issue but with quantity. Have you figured out the issue?
Hace 2 años
Sorry for the delay. We have not been able to figure this out. The issue remains. There seems to be a few issues with distributed cache. Unfortunately it looks like updates to distributed cache were recently moved from the 4.50 release to 4.60. We were hoping to see a fix. Vertical scaling for now!
Hace 2 años
This ‘might’ prove useful to you?

https://github.com/nopSolutions/nopCommerce/pull/6015
Hace 2 años
Thank you for the link!
Hace 2 años
brandon71 wrote:
It looks like something is not being updated correctly in the distributed cache when an item is added or deleted. The first item is always added correctly then its random after that. Some items add and some do not.

If we wait for the Short term cache to expire and reload the page the items appear. The same thing is happening for deleting items. Once short term cache expires all is good again, items show or disappear as expected. So the questions is what is not right with caching? It could be our setup but we are leaning away from that. As mentioned we have two separate farms setup. One on Redis and the other using SQL Server for distributed cache.  Both have the same issue. Of course the same guy (me) :) setup both web farms following the documentation very carefully!

If we remove all servers but one from the IIS web farm all is working as expected. As soon as we add a second server to either web farm the issue shows up again.

We are using applications in the path domain.com/US/ or domain.com/MX/. We have changed one of the web farms to no longer use applications however the issue persists (i.e. domain.com). We also unchecked "SEO friendly URLs with multiple languages" just to make sure the url pathing was not causing any issues.

We have spent hours and hours testing, retesting, reevaluating our setup with web farms. As long as we  wait for short term cache to expire everything refreshes and is working great.  

We need to get to the bottom of this asap so any additional help would be greatly appreciated.
please see the video of what we are seeing below:

https://www.youtube.com/watch?v=Ij_x9jPvw2Q&t=5s


Remove cache for shopping cart will resolved the issue and even for settings. As the setting table can have 5k-7k data which is nothing to retrieve from table directly.  But the concern is how other will behave something like discount on the product,category,manufactures, etc. depending on the end date if the discount so not disable then do not know how to solve that.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.