Redis and Core 2.2 - Solution

Posted: April 18, 2019 at 1:04 PM Quote #228692
We found that RedLock.net was using an older StackExchange.Redis library on the nuget package 2.2.0.

There is a bug in the StackExchange.Redis library, and it causes timeouts, locks, all kinds of issues.

If you need to fix this now, here is what we did:

1. Checkout the RedLock.net code from github: https://github.com/samcook/RedLock.net
2. Open the code, and update-packages in the nuget console.  (Or probably through the UI as well )
3. This should update your StackExchange.Redis to the latest version: 2.0.601
   <PackageReference Include="StackExchange.Redis" Version="2.0.601" />
4. Build the release version.
5. Copy the dlls of the release into a directory in your solution.
6. Remove RedLock in NOP and add in the compiled version you created.

7. Now there is a conflict with Microsoft.AspNetCore.DataProtection.Redis v.0.4.1, remove it.
8. Add Microsoft.AspNetCore.DataProtection.StackExchangeRedis v2.2.0
9. Now modify Nop.Web.Framework/Infrastructure/Extensions/ServiceCollectionExtension.cs:
   remove - services.AddDataProtection().PersistKeysToRedis()
       to - services.AddDataProtection().PersistKeysToStackExchangeRedis(() =>


That should do it!


I hope that helps someone else.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: May 30, 2019 at 8:27 AM Quote #236829
Fail.   We thought this worked, but after load testing, we realized we still get the timeouts.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more